Skip to main content

GraphQL Component

Make GraphQL requests (queries and mutations) to a GraphQL-based API

Component key: graphql

Description#

The GraphQL component allows you to make requests to a GraphQL-based API.

GraphQL Authentication#

You can use the built-in connection types to connect to a standard GraphQL API with basic auth, API key or OAuth 2.0. If the API that you're connecting to uses non-standard authentication (for example, it uses a header named X-API-Key), you can pass in authentication information through the header input.

GraphQL Connections#

API Key#

If an API Key connection is supplied, an Authorization: Basic ${APIKEY} header is used in the HTTP request.

InputNotes
Input
API Key
string
/ Required
Notes
API Key

OAuth 2.0 Authorization Code#

If an OAuth 2.0 connection are supplied, an Authorization: Bearer ${KEY} header is used in the HTTP request, where KEY is the client key that is fetched from the OAuth provider.

InputNotes
Input
Authorize URL
string
/ Required
Notes
The OAuth 2.0 Authorization URL for the API
Input
Client ID
string
/ Required
Notes
Client Identifier of your app for the API
Input
Client Secret
password
/ Required
Notes
Client Secret of your app for the API
Input
Headers
string
Key Value List
Notes
Additional header to supply to authorization requests
Input
Scopes
string
Notes
Space separated OAuth 2.0 permission scopes for the API
Input
Token URL
string
/ Required
Notes
The OAuth 2.0 Token URL for the API

Basic Username/Password#

If a Basic Auth connection is supplied, an Authorization: Basic ${base64(USERNAME:PASSWORD)} header is used in the HTTP request.

InputNotes
Input
Password
password
/ Required
Notes
Password
Input
Username
string
/ Required
Notes
Username

OAuth 2.0 Client Credentials#

InputNotes
Input
Client ID
string
/ Required
Notes
Client Identifier of your app for the API
Input
Client Secret
string
/ Required
Notes
Client Secret of your app for the API
Input
Headers
string
Key Value List
Notes
Additional header to supply to token requests
Input
Scopes
string
Notes
Space separated OAuth 2.0 permission scopes for the API
Input
Token URL
string
/ Required
Notes
The OAuth 2.0 Token URL for the API

Actions#

GraphQL Request#

Issue a generic GraphQL request | key: graphqlRequest

InputDefaultNotesExample
Input
Connection
connection
Default
 
Notes
 
Example
 
Input
Debug Request
boolean
/ Required
Default
false
Notes
When true, the entire request and response (including auth headers) will be logged out.
Example
 
Input
GraphQL Endpoint
string
/ Required
Default
Notes
The endpoint of the GraphQL API
Example
https://api.example.com/graphql
Input
Headers
string
Key Value List
Default
Notes
Custom headers to send along with your request
Example
 
Input
Query or Mutation
code
/ Required
Default
query ($customerName: String!) {  customers(name: $customerName) {    nodes {      id      labels      users {        nodes {          id          email        }      }    }  }}
Notes
 
Example
 
Input
Variables
string
Key Value List
Default
Notes
Variables to pass in to your query or mutation
Example