Skip to content

Instantly share code, notes, and snippets.

@lacom
Created October 27, 2023 16:51
Show Gist options
  • Save lacom/56e3834834e250270062583f425274b9 to your computer and use it in GitHub Desktop.
Save lacom/56e3834834e250270062583f425274b9 to your computer and use it in GitHub Desktop.
Shopify GraphQL API throttled example response
{
"errors": [
{
"message": "Throttled",
"extensions": {
"code": "THROTTLED",
"documentation": "https://shopify.dev/api/usage/rate-limits"
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 70,
"actualQueryCost": null,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 66,
"restoreRate": 50
}
}
}
}
@lacom
Copy link
Author

lacom commented Oct 27, 2023

Max cost exceeded example response

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment