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:
|Name||Name that will be displayed to users when selecting this integration in Superblocks|
|URL||GraphQL URL to connect to|
|Authentication||Choose from the following options detailed further here:|
|Headers||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
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 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:
- 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