Set up GraphQL clients
As Delivery Gateway uses a GraphQL API with a single endpoint, we recommend setting up a GraphQL client IDE to access it. There are multiple open source IDEs you can use. Check out the full list in the GraphQL organization tool directory: Tools and libraries.
Learn more about GraphQL in our introductory guide: GraphQL
To set up a GraphQL IDE:
-
Select a client. Popular examples include Altair, Apollo, Insomnia, or Relay.
-
Set the Delivery Gateway Merchant API endpoint in the client:
https://api.deliverygateway.io/graphql/merchant. -
Add an authorization header:
Authorization: Bearer <TOKEN NUMBER>.Replace
<TOKEN NUMBER>with your personal access token: Create Bearer access token. Different clients have different ways of adding the header: for example, some clients offer the option of selecting Bearer from a list of authentication options and you only need to manually input the actual token. -
Set the client's request method to
POST. All GraphQL requests, including queries, are POST requests.noteSome clients offer a GraphQL mode. If it's available, use it.
-
If needed, fetch the schema to render documentation with an introspection query:
query IntrospectionQuery {
__schema {
types {
name
}
}
}noteMost clients automatically fetch the schema and render the documentation in a Docs panel.
When done, test the client: run some queries and mutations to make sure everything works as it should. To test things, we recommend using our sandbox environment.