3 ms·
I get the “why” of GQL - what I fail to grok is the “when” for many endpoints. Case in point: Shopify. They have nominally a perfectly functional RestAPI whic
by MissTake 3y ago
I get the “why” of GQL - what I fail to grok is the “when” for many endpoints.
Case in point: Shopify.
They have nominally a perfectly functional RestAPI which they seem to be putting secondary to their GraphQL api.
Take, for example their Customers endpoint [1]. Aside from giving you access to the metafields, I fail to understand why this is even a thing that can’t be done with field selections in the RestAPI.
What is the raison d'être here? What problem does this solve that cannot be solved by just adding in metafields in the RestAPI?
I get that one is not limited to Customers and that, technically speaking you can perform complex subqueries, but that’s not how Shopify “sell” you on the GraphQL API.
It just feels like an unnecessary complication for complications sake, that only makes life harder when automating queries due to the ever changing query cost.
[1] https://shopify.dev/docs/api/admin-graphql/2023-10/queries/customer https://shopify.dev/docs/api/admin-graphql/2023-10/queries/c...