hasNextPage
, endCursor
), simplifying client-side implementation.getCatalogData
query includes a pageInfo
field, which provides metadata about the current result set and allows clients to effectively implement pagination.
hasNextPage
(Boolean
)true
→ Additional pages exist.false
→ You’ve reached the end of the list.startCursor
(String
)before
parameter to fetch the previous page, if needed.endCursor
(String
)after
parameter when querying the next page of results.pageInfo
fields—hasNextPage
, startCursor
, and endCursor
—these values can now be applied in the getCatalogData
query to control pagination behavior.
By using the endCursor
as the after
argument, clients can request the next page of results. Similarly, the startCursor
can be passed as the before
argument to retrieve the previous page. This approach enables efficient, cursor-based pagination that ensures consistent data retrieval, even in dynamic datasets. Please see the full list of available pagination arguments for the getCatalogData
query:
Argument | Type | Description |
---|---|---|
after | Cursor | Returns the elements after the specified cursor. Use for forward pagination. |
before | Cursor | Returns the elements before the specified cursor. Use for backward pagination. |
first | Int | Limits the result to the first n elements after the after cursor. |
last | Int | Limits the result to the last n elements before the before cursor. |
getCatalogData
query supports two mutually exclusive pagination approaches. In both cases, the number of items returned must not exceed the limit of 100.
Pagination Type | Required Argument(s) | Optional Cursor | Constraints |
---|---|---|---|
Forward | first | after | first must be > 0 and ≤ 100 |
Backward | last | before | last must be > 0 and ≤ 100 |
first
and last
first
with before
last
with after
first
or last
endCursor
value from the pageInfo
object of the previous result into the after
argument.
pageInfo.hasNextPage
field will be set to false