Paginate through a List

For queries that return a list, all results will be returned with the items object/array.

You should also use totalItemCount, pageSize, currentPage, and totalPageCount to understand your relative location in a multi-page response.

The input object supports two keys that control pagination:
page: specifies which page is to be requested
pageSize : specifies the number of items on a page.*

*note: manipulating pageSize will change totalPageCount value. pageSize should not change between requests.

📘

For optimal performance when retrieving large datasets, we recommend setting the pageSize parameter to a maximum of 100. While values exceeding 100 might be accepted by some resources, doing so will negatively impact performance.

query fetchUserListSampleQuery {
  fetchUserList(input: {
    page: 2, # default is 1
    pageSize: 50, # default is 25, maximum is 100
  }) {
    totalItemCount
    pageSize
    currentPage
    totalPageCount
    items {
      id
      email
    }
  }
}