Using GraphQL Syntax in Rivery Action Rivers
Some API’s utilize GraphQL syntax for sending request body. GraphQL is a query language that uses node-link relationships between entities to return exactly the data that the user requested, and no more. It is oftentimes used when querying small sets of data within a much larger database of information.
In this article we will discuss using Postman for inputting GraphQL-syntaxed bodies into Rivery’s Action Rivers.
For example, the Shiphero API uses graphql syntax for retrieving orders and vendor information from the server:
Process
In order to pass a GraphQL query in a request body of an action river, follow these steps.
- Replicate the request in Postman.
- Change the body of the request to a “GraphQL” type:
- Paste the GraphQL query from the API’s documentation into the body.
- Send the request successfully.
- Click the “<>” icon on the right hand side of the postman interface.
- Under “code snippet” change the language to “HTTP”:
- Copy the query piece of the code snippet and paste it into Rivery:
- You should now be able to set up the request in Rivery and send it successfully!