Pagination with shopify request

Pagination with shopify request

lknls
Shopify Partner
2 0 0

Hello

 

1) I've registered the shopify

2) I've created the development store

3) Development store has 17 products

4) I'm trying to get all products with API.

https://shopify.dev/docs/api/usage/pagination-rest and https://shopify.dev/docs/api/usage/pagination-graphql document says that i need to make request and response header will provide previous and next request link for the paging

 

If user want to visit 5th page, it has click 5 times to the "next button"

 

Have shopify a real paging something with limit and limit start? It's not a good idea to say "hey you have to click 5 times to next button for visiting 5th page" to the users

 

* how can i solve this fundamental issue? is there any real paging with shopify api?

* is there any real reason that shopify makes pagination so weird ? i mean something like "shopify servers can not handle it" etc

 

thanks for the all comments

Replies 2 (2)

Liam
Community Manager
3108 340 872

Hi Lknls,

 

Just to confirm - you'd like to be able to specify that you want to navigate to a specific page rather than having to traverse through the individual pages?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

lknls
Shopify Partner
2 0 0

Hello Liam

 

Lets assume the following things

 

* i've 5000 products

* 2000 of the products is in the "Shoes" collection

* 1500 of them has minimum 500$ prices

 

I want to fetch those 1500 shoes with rest API (or any API) with paging. I want to fetch 50 products per request

 

Thanks for the reply

 

Thanks