Skip to main content

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. Select GraphQL from the in-app integrations page

Select GraphQL from the in-app Integrations page and fill out the form with the following configuration:

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 REST API integration form:

Screenshot of Fetch Credentials Dynamically

Use a workflow to dynamically fetch credentials

2. Fill out the form and click "Create Integration"

info

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

Connect to a GraphQL API using Superblocks

3. Set environments

After creating the integration, you can optionally set different connection settings for your Production and Staging environments. Be sure to click Test Connection for each environment.

success

GraphQL Connected You can now write GraphQL queries to read from and write to 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