You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem does this feature proposal attempt to solve?
When the @throttle directive is applied and hit, the client side has no way to know when they can re-try.
Which possible solutions should be considered?
How could the problem be solved? What alternative solutions exist? Which is best?
Status on the response is 200 OK not a 429 Too many requests http status which is ok I suppose as there is the errors array.
json
{
"errors": [
{
"message": "Rate limit for Query.user exceeded. Try again later.",
"extensions": {
"category": "rate-limit"
},
But no information is included with the error for when client can re-try their request.
It may not be configured to decay at a rate of 1 minute after-all.
A solution involving HTTP headers does not belong with @throttle or even Lighthouse at all, since that would mix the responsibilites of the GraphQL and HTTP layer. @throttle provides per-field rate limits, not per-request.
What problem does this feature proposal attempt to solve?
When the
@throttle
directive is applied and hit, the client side has no way to know when they can re-try.Which possible solutions should be considered?
How could the problem be solved? What alternative solutions exist? Which is best?
Status on the response is 200 OK not a 429 Too many requests http status which is ok I suppose as there is the
errors
array.But no information is included with the error for when client can re-try their request.
It may not be configured to decay at a rate of 1 minute after-all.
Graphql Spec does not mention how to error specifically for rate limit information presumably details could be added to the extended data.
https://spec.graphql.org/October2021/#sec-Errors
Reading into this elsewhere on githubs api docs for example.
https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit
Suggests a rateLimit object.
Where this issue for githubs own graphql mentions response headers.
github/docs#22607
Suggests headers.
The text was updated successfully, but these errors were encountered: