Pagination
Last updated
Last updated
We are using a Cursor-based pagination, a method of pagination that uses a unique identifier (cursor) to keep track of the current position in the dataset.
Here's a general overview of how it works:
Usage: The takes in parameters such as limit
, search
,before
, and after
to control the pagination.
Cursor: The before
and after
parameters are used to specify the cursor for fetching the previous or next page of results. The cursor typically represents the position of a specific record in the dataset.
Sorting: The data is sorted by the createdAt
followed by id
Result: The response returns the paginated results along with cursors for the next and previous pages, allowing for easy navigation through the dataset.
For example:
hasNextPage
tells you if there's a next page in the queried data
object
To go to the next page, you can use the after
Query Parameter with the current page's endCursor
value.
hasPreviousPage
tells you if there's a previous page in the queried data
object
To go to the previous page, you can use the before
Query Parameter with the current page's startCursor
value.
List of Apis that has pagination