Pagination
Our GraphQL API supports pagination through the limit and offset parameters. These parameters help you control the volume of data fetched in a single query, improving performance and reducing load on both the client and server.
Limit: specifies the maximum number of items to be returned in a single query, restricting the size of your data payload.
Offset: specifies the number of records to skip before beginning to return the results. Useful allowing users to navigate through lists or datasets incrementally using "next page" functionality.
Here's an example query using both limit and offset to paginate through a list of patients, where it skips the first 5 patients and returns the next 5.
{
patients(limit: 5, offset: 5) {
person {
firstName
lastName
}
}
}Was this helpful?
Was this helpful?