API Reference

One of the great feature of GraphQL is the support of introspection which allows to easily explore with details the full content of the API. You will be able to explore each queries and mutations and learn how to write them.

GraphiQL

Intro

GraphiQL is the GraphQL integrated development environment (IDE).

We have plugged in GraphiQL to Stockpit's API so you can easily play around the API and tests your queries and mutations. You can find it at this link : GraphiQL

Authorization

You can add your Bearer token for GraphiQL to tests the API by adding it to the headers (refer to the Setup page to generate this token) :

{
  "Authorization": "Bearer 38|yvbzxq9eAXcATAR4vpxhLDrlO3ZmeXlGwN2rn5Uwa8a22240"
}

Make queries

In the top left menu of GraphiQL, you will find 3 items : Docs, History and Explorer.

The Docs menu will let you explore each queries, mutations, types and fields of the API.

The History menu will allow you to see your request made in the past.

The Explorer menu will help you create your queries automatically using proper GraphQL syntax with all the available fields for each entities.

query CustomersQuery {
  Customers {
    data {
      id
      label
    }
  }
}