Skip to content

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#

Create webhook#

  1. 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 } }" 
    }
    
  2. Set the host URL to point to your server.

Info

For detailed instructions on how to create webhooks, see the Webhook and Overview chapters.

graphql-configuration

Query the GraphQL server#

Now, check if the new device has been added.

graphql-explorer


Last update: November 29, 2024