Skip to content
Last updated

Pagination

List queries accept pagination:

ArgumentTypeDescription
pageIntPage number (starts at 1)
perPageIntItems per page

Example variables:

{ "page": 1, "perPage": 20 }

List responses include a pagination object with totalCount, currentPage, totalPages, hasNextPage, and hasPreviousPage.

Example

Pass page and perPage on list queries such as tags, customers, and conversations.

query {
  customers(page: 2, perPage: 20) {
    data { _id firstName }
    pagination {
      totalCount
      currentPage
      hasNextPage
    }
  }
}
query {
  customers(page: 2, perPage: 20) {
    data { _id firstName }
    pagination {
      totalCount
      hasNextPage
    }
  }
}