Pagination
Queries that return multiple records accept the limit
and offset
parameters. limit
designates the maximum number of records to return, while offset
determines the offset from the first item in the unpaginated records.
The limit
parameter will default to 100, which is also its maximum. The offset
parameter defaults to 0, which will return the beginning of the unpaginated records.
Default Pagination Parameters​
These parameters are available on all queries that accept pagination.
Key | Type | Default | Description | Example |
---|---|---|---|---|
direction | Direction? | ASC | Whether to order results ascending or descending. | DESC |
limit | int? | 100 | The maximum number of items to return. See API Limits. | 100 |
offset | int? | 0 | The index of the first item to return. | 0 (the first item) |
orderBy | string? | createdAt | Which field to order results by. *See individual query documentation for allowed values. | "createdAt" |
*All paginated endpoints support ordering by the createdAt
and updatedAt
columns by default.
Direction
​
Allowed directions are ASC
(ascending) and DESC
(descending).
Example Query​
query {
jobs(
orderBy: code,
direction: ASC,
limit: 25,
offset: 5
) {
id
code
name
}
}