Files
noodl-docs/library/modules/graphql/graphql-node.md
Eric Tuvesson 656e5fc8d2 chore: Upgrade Docusaurus from v2 to v3 (#52)
* chore: Upgrade Docusaurus from v2 to v3

* chore: Update "Test build" GH workflow

* fix: build

All markdown is processed as MDX

* fix: Broken links
2024-01-12 16:53:22 +01:00

40 lines
1.1 KiB
Markdown

---
title: GraphQL Query
hide_title: true
---
{/*##head##*/}
# GraphQL Query
This node enables you to connect to GraphQL based API:s in a quick and easy way.
![](/library/modules/graphql/graphql-guide-img/graphql-query-node.png)
{/*##head##*/}
## Inputs
**Query**
Input your GraphQL query in this field. Example: `{ hero { name } }`
**Endpoint**
A URL for the service that you are using.
**Results**
Click the plus button to define the name of the results array you want to receive from your query. If your query was `{ hero { name } }`, you would give your result the name `hero`.
**Request Headers**
Use this field to add any headers the GraphQL service requires.
Example:
```javascript
headers({ 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer f60e2ea4dcd07fbcdaef8c8cd8418e', })
```
**Fetch**
Send a signal to this input to execute your GraphQL query.
## Outputs
**Results**
This is a list of the results that were defined in the inputs. Each result will have the name that was defined in the inputs section and it will be an array of items.