I think it would be really helpful for developers to know how the GraphQL API calculates its cost. It's practically impossible to build clients that manage rate limiting without knowing the requestQueryCost before making the request. The GitHub GraphQL developer documentation provides this calculation so I think it's a reasonable expectation for developers to have this.
Hey @Anthonator ,
I completely understand what you mean, and I'm on board with this idea and will bring it up internally. I also want to mention though it's not quite as simple on Shopify as it is for GitHub, judging by their documentation it seems as though they assume that every resource has a cost of 1 when performing a query.
Not every resource or mutation on Shopify has the same cost though, so there's an additional layer of complexity involved and it wouldn't just be a simple case of addition and multiplication to estimate a query's cost.
Thanks for bringing this up internally. This is going to be important for client developers to effectively manage rate limiting.
Keep us posted!
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022