Skip to main content
For GraphQL APIs, use the request step function with method: post and the query in the body. Pass the query and its variables as separate body args.

Error handling

GraphQL returns 200 even for errors, so check the response’s errors field rather than the status code:

Best practices

  • Define variables for every dynamic value, and pass them in a separate variables object rather than inlining them in the query string.
  • Request only the fields you need, and use fragments for reusable field selections.
  • For pagination, use the provider’s cursor fields, such as pageInfo.hasNextPage and pageInfo.endCursor.
Keep the query static and supply values through variables:

Step functions: request

The request step used to issue the GraphQL POST.

Expression language

JEXL defaults and conditions used in the query variables and error check.