Zoho Deluge: Shopify API: Get all active products with GraphQL and Pagination
- Joel Lipman
- Zoho
- Hits: 2809
An article to resolve my frustration in being able to ONLY retrieve the first 100 products using GraphQL, so page 1 of Shopify products.
Why?
Our use-case is that we retrieve the 100 most recently modified products at the end of each day and run some Deluge code against it to ensure that the data in Shopify is the same as in Zoho. In this case, Shopify is considered the source of truth and Zoho is the data to be overwritten, ensuring that Product IDs, Variant IDs, Inventory IDs, Current Selling Price, Inventory Level, and Barcode all match.
Our problem is that sometimes more than 100 products are modified in a day... We need to be able to do more than 100 or at least resume from a record... We need pagination.
How?
To resolve this, I'm building on top of my initial GraphQL query which will now retrieve 10 products per page and loop through 3 pages for use in Zoho Deluge. If this works, we can increase the number of pages as well as the number of products per page: