Re: New Product APIs and Query costs

New Product APIs and Query costs

garyrgilbert
Shopify Partner
414 41 170

Hey All,

 

With the deprecation of the REST API product and variant endpoints will there be an adjustment to the graphql query costs/limits for the Product graphql queries?  Considering I can currently get multliple Products (up to 250) with all of its properties and all of its variants in a single REST API request migrating to graphql for certain tasks is incredibly inefficient and expensive. Where one HTTP request was needed several hundred will be required to migrate code without having to also migrate to use Bulk operation queries and the associated webhook to wait for the callback.

 

Cheers and thanks,

Gary

 

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Replies 4 (4)

Ashish_Shah
Shopify Staff
22 7 9

We have now raised the rate limits for standard shops from 50points/second to 100 points / second. We have also updated the query calculations for querying connections. With these changes, your app should be able to maintain the same or higher throughput as before when using REST.

 

To learn more about how to optimize your app for throughput, read more here

To learn more about querying product data in GraphQL read here

ALIAS | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

garyrgilbert
Shopify Partner
414 41 170

Thanks for the reply and for the information regarding the increased points/second, Though I remain skeptical that it would be possible to get 250 products with all their attributes and variants in the same amount of time or better using graphql. I'd be very interested in seeing the data to back that claim 🙂

 

Cheers,

Gary 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
JoshHighland
Shopify Partner
213 12 76

Another example is "products/count.json". With REST I get a number back. simple and works great - it has for the last 10+ years. With GraphQL getting the count of products is not possible. 

 

Now have to make many calls walking the products with pagination and keeping count of the iterations.

SEO Manager - The all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -
SPEAZ
Shopify Partner
26 3 14

Hello ! "With these changes, your app should be able to maintain the same or higher throughput as before when using REST."

I dont see how GraphQL is supposed to maintain the same performance as REST when you deal with a lot of data ?

e.g if you want to grab 1000 products with all variants it's take 5sec with REST and 30sec+ with graphQl ?

Or maybe i am missing something ?