OVERVIEW
This article will teach you how to call a GraphQL service in Okta Workflows.
SOLUTION
The flow will use this Countries GraphQL endpoint example from Postman. The API endpoint is at https://countries.trevorblades.com.
The next flow makes a call to a GraphQL service:
Call to a GraphQL service.
The automation has the next steps:
- The Object-Construct card creates a call query. Note that the field name is set to query.
- The API Connector-Post card makes a call to the GraphQL service.
The automation result:
Calling GraphQL service result.
Note the API Connector-Post card isturned off, showing the Status Code and Headers fields for clarity.
Extract data from result
If you want to extract a value from the response, the following screenshot, for example, shows how to extract the emoji value from the response:
Extracting data from the response.
Download flow
Download the flow for this article.
RELATED REFERENCES
