mirror of
https://github.com/noodlapp/noodl-docs.git
synced 2026-01-11 06:42:55 +01:00
* chore: Upgrade Docusaurus from v2 to v3 * chore: Update "Test build" GH workflow * fix: build All markdown is processed as MDX * fix: Broken links
40 lines
1.1 KiB
Markdown
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.
|
|
|
|

|
|
|
|
{/*##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.
|