Network: Execute a GraphQL query or mutation

Execute a GraphQL query or mutation.

Help Centre › Building Processes

Execute a GraphQL query or mutation.

Add it to a process

In the process designer, open the Add step tab. Find Execute a GraphQL query or mutation under Network › Protocols, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
GraphQL endpoint URLYesThe request URL or path (appended to the base URL)
GraphQL queryYese.g. { users { id name } }
Session nameNoSession name Default: default.
VariableYesName of the variable that keeps the reply, without braces, e.g. response. It holds status_code, headers and body, so a later step reads the data as {response[body]}. Default: response.
Variables (JSON object)Noe.g. {"id": "123"}
Additional headers (JSON object)NoHTTP headers to include, one per line (Header: Value)
Timeout (seconds)NoRequest timeout in seconds

What it gives back

  • {response} – GraphQL response data

See all Network steps.

Errors

ErrorDescription
Connection failedUnable to establish a connection to the GraphQL endpoint
Query validation errorThe GraphQL query is invalid or does not match the schema

Tips

  • Always check response.body.errors for GraphQL-level errors, even when the HTTP status is 200
  • Use the variables parameter instead of string interpolation for dynamic values – this is safer and enables query caching
  • Use a session (api-session) with auth for APIs that require authentication

Related functions

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.