Skip to content

Set up Postman with GraphQL client

This guide will help you set up a new collection with a new GraphQL request.

Install

Postman offers a great guide for downloading and installing the client, you can find it here.

Setup

We recommend you to use something called a collection in Postman to group your upcoming queries and use collection variables.

The steps below will help you set up a new GraphQL query request and a collection at the same time.

Creating a new request

  1. Almost at the top of the Postman windows, under Workspace, click on New and then select GraphQL.
  2. Click on Save in the upper right corner, give the Request a name, maybe MyFirstRequest and then click on New collection at the bottom of the windows.
  3. Give the new collection a name, maybe EasitGO-Test-GraphQL.
  4. Click on create and then save at the bottom of the windows.
  5. Before we do anything else, click on the collection we just created in the left pane and click on Variables. Here you should add two variable, url and apikey.

    • url - Initial value should be [urltoEasitGO]/graphql/
    • apikey - Your API-key.
  6. When you have entered the variables and saved, go back to the request you created in step 2 and click on Authorization. Set Type to Bearer Token and enter the variable like this, {{apikey}}.

  7. Click on Query and enter the url variable in the URL field ({{url}}).
  8. Give Postman a second to load the schema from the URL and should see a list of query operations.
  9. Tick and then click on Query in the upper right corner and you should get a response in the bottom pane.

Congratulations, you have successfully made your first query request.

Further reading from Postman