graphql admin api rate limits, limits per query is 1000 but I have 10000 cost available

Solved

graphql admin api rate limits, limits per query is 1000 but I have 10000 cost available

AW1234
Shopify Partner
44 7 12

Hi,

When I make a graphql request, with nodejs, I have this object { maximumAvailable: 10000, currentlyAvailable: 9770, restoreRate: 500 } that shows me how many cost I have available, how many I used and how many I restore every seconds.

Now there is also a limit PER request, as I can see it's 1000

{
    message: 'Query cost is 1040, which exceeds the single query max cost limit (1000).\n' +
      '\n' +
      'See https://shopify.dev/concepts/about-apis/rate-limits for more information on how the\n' +
      'cost of a query is calculated.\n' +
      '\n' +
      'To query larger amounts of data with fewer limits, bulk operations should be used instead.\n' +
      'See https://shopify.dev/api/usage/bulk-operations/queries for usage details.\n',
    extensions: {
      code: 'MAX_COST_EXCEEDED',
      cost: 1040,
      maxCost: 1000,
      documentation: 'https://shopify.dev/api/usage/rate-limits'
    }
  }

My question is simple, is there a way to increase that limit per request?

Today I make a request and wait a certain amount of time depending of currentlyAvailable and restoreRate, but I want to make bigger requests, I have 10000 cost available but I can only use 1000.

Thanks to everyone that can answer.

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 238 497

This is an accepted solution.

Hey @AW1234 - this is a great question. At the moment, even if you have a maximumAvailable value which is greater than 1000, you are limited to a query cost of 1000 for a single request as documented here. Other than for Shopify Plus apps/merchants, we don't have a way to increase rate limits at the moment as a general rule. 

 

Other than splitting up the request in two parts so that each query is less than 1000 points (and waiting based on the restore rate provided), you could also make use of our bulk operations feature. Bulk operations can sometimes take more time to process than a regular query/mutation and are limited to certain functionalities, but they are a decent method for transmitting larger amounts of data if needed. Hope this helps - let us know if we can clarify anything on our end. 

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 497

This is an accepted solution.

Hey @AW1234 - this is a great question. At the moment, even if you have a maximumAvailable value which is greater than 1000, you are limited to a query cost of 1000 for a single request as documented here. Other than for Shopify Plus apps/merchants, we don't have a way to increase rate limits at the moment as a general rule. 

 

Other than splitting up the request in two parts so that each query is less than 1000 points (and waiting based on the restore rate provided), you could also make use of our bulk operations feature. Bulk operations can sometimes take more time to process than a regular query/mutation and are limited to certain functionalities, but they are a decent method for transmitting larger amounts of data if needed. Hope this helps - let us know if we can clarify anything on our end. 

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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