Pagination
Starting in API version 2019-07 Shopify only support relative pagination. You can fetch the next set of data using nextPageParameters
For example, let's say you want to fetch multiple pages of products, you can do the following. Note that the maximum limit per retrieval call is 250 items.
1
(async () => {
2
let params = { limit: 10 };
3
​
4
do {
5
const products = await shopify.product.list(params);
6
​
7
console.log(products);
8
​
9
params = products.nextPageParameters;
10
} while (params !== undefined);
11
})().catch(console.error);
Copied!
​
Last modified 1yr ago
Copy link