Changes in pagination API - how to go to the random page

Highlighted
Shopify Partner
6 0 0

Hi!

From the 1st of March you are deprecating the current pagination API with pageNumber and limit parameters. Now you are introducing cursor-based pagination.

 

The problem is that we need to go from page 1 to page 50 (for example). How should we do it with cusror-based approach without having to do 50 requests?

 

We do not have our own Database to copy all of the products there and use webhooks.

 

Thanks

0 Likes
Highlighted
Shopify Partner
1777 211 370

Might be the time to reconsider your design.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
Shopify Partner
6 0 0

I don't understand

For example, user wants to go from the 1st to the last page. How would he do this?

How should we change our design?

0 Likes
Highlighted
Shopify Partner
1777 211 370

You cannot go to a random page using cursor based pagination. This guide describes it well how you can implement a cursor based pagination - https://help.shopify.com/en/api/guides/paginated-rest-results

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
Shopify Partner
6 0 0

Thanks

 

So why are you deprecating it?

0 Likes
Highlighted
Shopify Partner
1777 211 370

I am not part of the Shopify team, so can't speak for them. But as a general rule, cursor based navigation costs less from performance perspective.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes