List fields in the v3 API are connections and use cursor-based pagination,
following the Relay connection
pattern. Any field whose type ends in Connection (for example
ProductConnection) is paginated.
Connection shape
Every connection exposes nodes, edges, and pageInfo:
PageInfo contains:
Paging forward
Pass first to set the page size and after to continue from a cursor:
To fetch the next page, send endCursor from the previous response as after:
Keep requesting while pageInfo.hasNextPage is true.
Page size
first and last accept 1 to 100. A connection requested without either
returns 25 items. A page size outside that range returns HTTP 400.
Paging backward
Pass last and before (a startCursor from a previous page) to page toward
the start of the list, and keep requesting while pageInfo.hasPreviousPage is
true. Combining first/after with last/before in one request returns
HTTP 400 with the code INVALID_PAGINATION.
Sorting
Many connections accept orderBy (a sort key enum, such as ProductSortKey)
and reverse to flip the direction:
Cursors encode the sort position, so always keep orderBy and reverse
consistent across pages of the same list.