Since I had to implement this to pull data into our custom BI system I thought I’d share it with the community as well in case someone else was interested or had to do something similar.
The script fetches orders from a Shopify store (via private app access token) using the GraphQL API.
It supports pagination by following cursors.
Uses Docker to run if you don’t want to install Python 3 + required dependencies.
Pagination implementation provides great help for me in building an app which export products from the platform. Is it possible to merge products and collections in a single query which yields collections in an array under the products?
I suggest that you read the documentation to see if you can craft a query that does what you want. You can test in the Shopify Admin API GraphiQL explorer and then modify the code.