> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.graphql.md).

# GraphQL

[GraphQL](https://graphql.org/) is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. Use the GraphQL node to query a GraphQL endpoint.

## Node parameters <a href="#node-parameters" id="node-parameters"></a>

{% hint style="info" %}
**This node can be used as an AI tool**

This node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](/build/integrate-ai/ai-examples/use-ai-for-parameters.md).
{% endhint %}

### Authentication <a href="#authentication" id="authentication"></a>

Select the type of authentication to use.

If you select anything other than **None**, the **Credential for** parameter appears for you to select an existing or create a new authentication credential for that authentication type.

### HTTP Request Method <a href="#http-request-method" id="http-request-method"></a>

Select the underlying HTTP Request method the node should use. Choose from:

* **GET**
* **POST**: If you select this method, you'll also need to select the **Request Format** the node should use for the query payload. Choose from:
  * **GraphQL (Raw)**
  * **JSON**

### Endpoint <a href="#endpoint" id="endpoint"></a>

Enter the GraphQL Endpoint you'd like to hit.

### Ignore SSL Issues <a href="#ignore-ssl-issues" id="ignore-ssl-issues"></a>

When you turn on this control, n8n ignores SSL certificate validation failure.

### Query <a href="#query" id="query"></a>

Enter the GraphQL query you want to execute.

Refer to [Related Resources](#related-resources) for information on writing your query.

### Response Format <a href="#response-format" id="response-format"></a>

Select the format you'd like to receive query results in. Choose between:

* **JSON**
* **String**: If you select this format, enter a **Response Data Property Name** to define the property the string is written to.

## Headers <a href="#headers" id="headers"></a>

Enter any **Headers** you want to pass as part of the query as **Name** / **Value** pairs.

## Templates and examples <a href="#templates-and-examples" id="templates-and-examples"></a>

[Browse GraphQL integration templates](https://n8n.io/integrations/graphql) or [search all templates](https://n8n.io/workflows/)

## Related resources <a href="#related-resources" id="related-resources"></a>

To use the GraphQL node, you need to understand GraphQL query language. GraphQL have their own [Introduction to GraphQL](https://graphql.org/learn/) tutorial.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.graphql.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
