Pagination
Our GraphQL API follows the Relay pagination spec.
When fetching collections from our API you can control how much data is returned. We will return 25 records per request by default and the maximum page size is 100 records.
We support two forms of page control arguments:
- Forward pagination with
after
(cursor) &first
(numeric count) - Reverse pagination with
before
(cursor) &last
(numeric count)
Note that these must not be mixed, e.g performing a query with values for first & before will result in a validation error.
Endpoints which return paginated results will return a pageInfo
object along with a totalCount
field which allows you to make subsequent calls with page controls. Using the getCustomers
API as an example this would look as follows:
Notice how we use the cursor information from the first page to fetch the second page. The returned pageInfo
looks as follows:
Was this page helpful?