Pagination & Sorting
Paginate and sort WebPixie GraphQL list queries with page, limit, and sort.
List queries (e.g. findSite, findUptimeLink, findIncident) accept page, limit, and sort arguments, and their responses include a pagination object.
Pagination
query {
findUptimeLink(page: 1, limit: 25) {
pagination {
page
limit
count
}
items {
id
name
}
}
}page— defaults to1limit— defaults to10; values above100are silently capped at100pagination.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
}
}
}directionacceptsASCorDESC, and defaults toDESCwhen omitted- If
sortisn't provided at all, results are returned newest-created first
A query can be sorted by the same fields it can be filtered by. See Discovering Filterable Fields for how to find them. Sorting by an unsupported field returns a GraphQL error naming the invalid field.