Skip to content

Execute GraphQl

Description

The GraphQL activity allows you to interact with external systems using the GraphQL protocol. You can perform queries (to retrieve data) or mutations (to update data), customize request headers, handle variables, and paginate through results using dynamic keys.

Use this activity to:

  • Execute queries to retrieve structured, nested data from APIs
  • Send mutations to modify or create records in external systems
  • Handle authentication via headers
  • Control pagination using nextPageKey behavior

Use Case:
Use this when integrating with platforms that expose GraphQL APIs (e.g., Shopify, GitHub, Contentful). For example, fetch product listings using GraphQL query, or update customer data using a mutation.


Input

Optional — used only if query variables are dynamically provided from a previous activity.


Output

Output TypeFormatDescription
DataJSONStructured response based on the query and root

Configuration Fields

Field NameDescription
ConnectionAuthentication/session info for the GraphQL API.
Base UrlURL of the GraphQL API (e.g., https://api.example.com/graphql).
Request TypeHTTP method (GET or POST) used for the GraphQL call.
HeadersKey-value headers like Authorization, Content-Type.
Url ParamsOptional query parameters appended to the URL.
ParametersAdditional key-value parameters for the request body.
OperationChoose between query or mutation.
QueryThe GraphQL query or mutation string.
VariablesKey-value pairs for GraphQL variables used in the query.
Root Of ResponsePath inside the response JSON from which to extract output (e.g., data.products.nodes).
Next Page KeyKey used for pagination (e.g., pageInfo.endCursor).
Next Key BehaviourHow to pass the next page key (as URL param or as GraphQL variable).
Data ForOptional time frame for which to fetch data.
Start DateStart date used when Data For = Date Range.
End DateEnd date used when Data For = Date Range.

Sample Input

Not Applicable


Sample Configuration

FieldValue
Connectionshopify-products
Base Urlhttps://example.myshopify.com/graphql.json
Request TypePOST
Operationquery
Query{ products(first: 10) { edges { node { id title } } } }
Root Of Responsedata.products.edges

Sample Output

idtitle
gid://123/1Cotton T-Shirt
gid://123/2Leather Wallet
gid://123/3Running Shoes