GraphQL#
GraphQL is a query language for APIs that enables clients to request only the data they need. This tutorial explains how to use Data Integration Center to send e.g. a mutation to a GraphQL server.
Prerequisites#
- Basic knowledge of GraphQL
- Working GraphQL server e.g. Apollo Server
- GraphQL client e.g. Sandbox
Create webhook#
-
First of all, adjust body template to send query with mutation. Mutation must be compatible with your schema, so for:
type Mutation { devices(endpointName: String, domainId: String): Device }
it would be
{ "query": "mutation AddDevice { devices(endpointName: \"$endpointName\", domainId: \"$domainId\") { endpointName domainId } }" }
-
Set the host URL to point to your server.
Query the GraphQL server#
Now, check if the new device has been added.
Previous
Datacake
Next
Slack
Last update: November 29, 2024