Good morning,
I decided to just use the remix template and to learn React to get started. I don’t know enough about the Shopify ecosystem to build a Python Flask App or even a Node Express.js App from the ground up. That being said, I am understanding more about the different API approaches. I am using Remix now, and that being said…is the following an accurate assumption between the REST API and the GraphQL API?
Shopify Admin API1. Purpose: The Admin API is used for managing various aspects of a Shopify store, including products, orders, customers, and more.
-
REST vs. GraphQL:
- REST: The REST interface of the Admin API involves distinct endpoints for different resources (like /products, /orders, etc.). It’s suitable for straightforward, isolated requests.
- GraphQL: The GraphQL interface allows for more complex queries with a single request. You can specify exactly which data you need, potentially reducing the amount of data transferred and simplifying data aggregation from multiple sources.
-
Choosing REST or GraphQL:
- For fetching product information, especially if you need specific fields or to aggregate data from different parts of the store, the GraphQL interface can be more efficient and flexible.
- If your needs are simple and align with the predefined structure of the REST API endpoints, then REST could be sufficient.
So if I am trying to query locations, variants, orders, items and products…I am understand these all have their respective relationships between various ID’s. If the relationships are all connected in some regard, will GraphQL simplify my querying process? As opposed to creating my own logic to connect these endpoints relationally?
Thanks!
James