Skip to main content
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:
  1. Forward pagination with after (cursor) & first (numeric count)
  2. 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: This will fetch a subsequent page of 50 entries by passing in the endCursor from an initial query.
Query
query getCustomers($cursor: String!) {
  customers(after: $cursor, first: 50) {
    edges {
      node {
        fullName
      }
    }
    totalCount
    pageInfo {
      hasPreviousPage
      hasNextPage
      startCursor
      endCursor
    }
  }
}
Variables
{
  after: 'eyJjdXN0b21lcnIRzlIODVORzE5SFdQIn0=';
}