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:
Setting | Required | Description |
---|---|---|
Name | TRUE | Name that will be displayed to users when selecting this integration in Superblocks |
URL | TRUE | GraphQL URL to connect to |
Authentication | TRUE | Choose from the following options detailed further here: |
Headers | FALSE | HTTP 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
3. Save
Click Create to save the integration.
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.
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:
- Select the GraphQL integration from the dropdown
- Write your GraphQL Query
- Add Variables, if required
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](/img/integrations/integrations-library/graphql/graphql-demo-data.png "Click "fill with demo data" to sync a GraphQL step with a demo API with one click")