Skip to main content
GraphQL logo

GraphQL


Overview

GraphQL APIs can be used in Application APIs, Workflows, or Scheduled Jobs, allowing you to call any internal or external GraphQL API from Superblocks, just like in Postman.

Setting up GraphQL

1. Add integration

Select GraphQL from the integrations page.

2. Configure settings

Fill out the form with the following settings:

SettingRequiredDescription
NameTRUEName that will be displayed to users when selecting this integration in Superblocks
URLTRUEGraphQL URL to connect to
AuthenticationTRUEChoose from the following options detailed further here:
HeadersFALSEHTTP headers to send with requests to this GraphQL endpoint

Note, if you need to retrieve credentials on demand with a custom workflow instead of using the pre-built authentication flows, enable "Fetch credentials dynamically". This allows you to run a Superblocks Workflow (which can issue an API call or connect to a secrets manager) to fetch the token and return it for use within your GraphQL integration form:

Screenshot of Fetch Credentials Dynamically

Use a workflow to dynamically fetch credentials

3. Save

Click Create to save the integration.

info

If using Superblocks Cloud, add these Superblocks IPs to your allowlist (not necessary for On-Premise-Agent).

4. Set profiles

Optionally, configure different profiles for separate development environments.

success

GraphQL connected Now you can use GraphQL in any Application, Workflow, or Scheduled Job.

Creating GraphQL steps

Go to an Application and create a new API:‌

  1. Select the GraphQL integration from the dropdown
  2. Write your GraphQL Query
  3. Add Variables, if required

Use a GraphQL step in an API to query data

info

Tip Click "Fill with Demo Data" at the top-right of the GraphQL step to call a demo API with 1 click

Click "fill with demo data" to sync a GraphQL step with a demo API with one click