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.
Hope this helps!
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!