Shopify GraphQL Python 3 Starter w/ Pagination

6 0 1

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.


GitHub repo:


Hope this helps! 


Replies 2 (2)

2 0 0


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?


Let me know if this is possible.




6 0 1


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.

The current query is here:

You'll have to modify that once you have the appropriate query that loads what you need.

Hope that helps!