-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nit: add rate limit extension example #1125
base: main
Are you sure you want to change the base?
Conversation
The committers listed above are authorized under a signed CLA. |
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Generally it's good practice to namespace the top fields in extensions to avoid conflicts, since the meaning is effectively granted to them by the entire ecosystem as a whole with no real governing documents/registry. For example, this Out of interest, what motivated this addition in particular? |
@benjie I've revised the example to better demonstrate how developers can implement rate-limiting using the extensions. Could you take a look please? |
{ | ||
"customNamespace" : { | ||
"requestRate": 2, | ||
"remaining": 98, | ||
"retryAfterMs": 0, | ||
"resetAfterMs": 1985 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't valid JSON since it had {{ ... }}
{ | |
"customNamespace" : { | |
"requestRate": 2, | |
"remaining": 98, | |
"retryAfterMs": 0, | |
"resetAfterMs": 1985 | |
} | |
} | |
"customNamespace": { | |
"requestRate": 2, | |
"remaining": 98, | |
"retryAfterMs": 0, | |
"resetAfterMs": 1985 | |
} |
I'm not convinced that the GraphQL spec needs an example of using the |
Add Rate Limit Extension Example