Pagination & Sorting

Paginate and sort WebPixie GraphQL list queries with page, limit, and sort.

Every list query (the ones starting with find, e.g. findSite, findUptimeLink, findIncident) accepts page, limit, and sort arguments, and every list response includes a pagination object.

Pagination

query {
  findUptimeLink(page: 1, limit: 25) {
    pagination {
      page
      limit
      count
    }
    items {
      id
      name
    }
  }
}
  • page — defaults to 1
  • limit — defaults to 10; values above 100 are silently capped at 100
  • pagination.count — total number of matching records, useful for calculating how many pages there are

Sorting

Pass one or more { field, direction } pairs to sort:

query {
  findUptimeLink(sort: [{ field: "name", direction: ASC }]) {
    items {
      name
    }
  }
}
  • direction accepts ASC or DESC, and defaults to DESC when omitted
  • If sort isn't provided at all, results are returned newest-created first

Sortable fields vary per query. Sorting by a field that query doesn't support returns a GraphQL error naming the invalid field.

On this page