Can't paginate using since_id

ktnaneri
New Member
1 0 2

I am having a problem. 

 

According to this post in Shopify blog - https://www.shopify.com/partners/blog/relative-pagination  it says:

Pagination with since_id

This is the simplest form of relative cursor pagination. Each request will include a since_id parameter with the id of the last record from the previous page. This does require the records to be sorted by id ascending, but this happens automatically when a since_id parameter is present. To ensure the first page is sorted by id, you can include a since_id parameter with a value of 0. This form of pagination already existed on all endpoints prior to the 2019-07 API version.

Please note that it says This does require the records to be sorted by id ascending, but this happens automatically when a since_id parameter is present. 

 

The problem I am getting is - even though I do pass the `since_id` set to 0 - the orders still do get paginated in DESCending order. And because of that, when I pass the last id - I get the same results with every request. 

Is there a way I can force the sorting by passing a param, without having to rely that the orders get sorted in ASCending way?