GraphQL requests

Positive Action GraphQL supports the HTTP GET and POST methods. You can send a query as a GET or POST request. Mutations must be POST requests.

Request headers

Positive Action accepts the following headers in a GraphQL request:

Header nameValueDescription
AuthorizationBearer <authorization_token>A customer token. Authorization tokens describes how to generate tokens.

Specify request headers in a GraphQL browser

GraphQL Playground example: img

GraphiQL example: img

Responses

GraphQL responses are in JSON. Every response is a JSON map and will include JSON keys for "data", "errors", or "extensions" following the GraphQL specification.

Successful queries are in the following format:

{
"data": { ... },
"extensions": { ... }
}

Queries that have errors are in the following format:

{
"errors": [ ... ],
}