Shopify's API via GraphQL in Python
GraphQL is a query language for APIs. It allows to define the structure of the requested data, which makes it possible to avoid returning overly large amounts of data.
Shopify’s Admin API can be queried with GraphQL. GraphQL queries are executed by sending POST HTTP requests. This can be achieved in Python with the
requests module like so:
Set your API access keyword in
YOUR_ACCESS_TOKEN. There are many examples given on how to structure the queries. Here is a simple example to get your 10 latest orders and their respective IDs: