ToolJet can establish connections with GraphQL endpoints, enabling the execution of queries and mutations.
<divstyle={{paddingTop:'24px'}}>
## Connection
To establish a connection with the GraphQL global datasource, you can either click on the **+ Add new global datasource** button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard.
<divstyle={{textAlign:'center'}}>
<imgclassName="screenshot-full"src="/img/datasource-reference/graphql/graphgds-v2.png"alt="ToolJet - Data source - GraphQL"style={{marginBottom:'15px'}}/>
</div>
ToolJet requires the following to connect to a GraphQL datasource:
- **URL**: URL of the GraphQL endpoint.
- **Headers**: Any headers the GraphQL source requires.
Query results can be transformed using transformations. Read our transformations documentation to see how: [link](/docs/app-builder/custom-code/transform-data)
Metadata is additional information about the data returned by the GraphQL query. It includes details such as the request URL, method, headers, and response status code. You can access this information using the `metadata` object. REST API. The metadata can be accessed within queries and components using the `{{queries.<queryname>.metadata}}` syntax.
:::info
While accessing the properties of the metadata object, which contains a hyphen, you can use the bracket notation. For example, to access the `content-length` property, you can use `{{queries.graphql1.metadata.request.headers["content-length"]}}` or `{{queries.graphql1.metadata.request.headers."content-length"}}`.