Pagination
The operators limit
and offset
are used for pagination of objects in our queries. limit
specifies the number of rows to return from the result set, and offset
determines the number of objects skip.
The following are examples of different pagination queries:
Limit Results
Fetch the first 5 posts from a list of posts.
Offset and Limit Results
Fetch the first 5 posts from a list of posts, skip first 3.
Offset and Limit Results in nested queries
Fetch the first 5 posts from list of posts, skip first 3, and fetch only the first category of each post.