Closed Kurbm closed 1 year ago
This shouldn't be much different from Collection query with pagination. All you need is to check if response has next page response.data.products.pageInfo.hasNextPage
and then add cursor to the next page link response.data.products.pageInfo.endCursor
. Using that cursor you should be able to fetch data for the next page.
Hey @kirillplatonov,
do you have an example code how to do pagination with graphql and next and prev buttons? I have seen your pagination with looping through all items at once, but this can lead to some loading time, if a user would have lots of items.
Would be super helpful, since I‘m a bit stuck.
Best and thanks, Kurbm