Hello, fellow devs! I’m working on GraphQL Admin API Rate Limit, and the documentation mentions as below:
All requests that are made after the limit has been exceeded are throttled and an {errors: [{ message: “Throttled” }]} error is returned.
Does any of you could share an example response from the request that was throttled? It’s hard for me to exceed the limits as our dev stores do not have enough data (i.e., orders or customers). I’m especially looking for a response body, and status code returned in case of exceeding API limits.
Is the “extensions” object indeed outside of “errors”? The documentation makes it looks like it should be within the error object. Can you confirm or have the documentation updated? Thanks
Its definitely outside the documentation is wrong.
I forced an error with a query and this is the result, “errors”, “data”, and “extensions” are all on the top level, though if you have gotten a throttle there wont be “data” just “errors” and " extensions"
{
"errors": [
{
"message": "first cannot exceed 250. To 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",
"locations": [
{
"line": 2,
"column": 17
}
],
"path": [
"productVariants"
]
}
],
"data": null,
"extensions": {
"cost": {
"requestedQueryCost": 46,
"actualQueryCost": 2,
"throttleStatus": {
"maximumAvailable": 20000,
"currentlyAvailable": 19998,
"restoreRate": 1000
}
}
}
}