ravangen / graphql-rate-limit

🚦 Fixed window rate limiting middleware for GraphQL. Use to limit repeated requests to queries and mutations.
https://www.npmjs.com/package/graphql-rate-limit-directive
MIT License
317 stars 12 forks source link

Question: How are the rate limits applied? #303

Closed adavis closed 2 years ago

adavis commented 2 years ago

How are the rate limits applied?

Are the rate limits applied per authenticated user or per IP address?

Thanks.

ravangen commented 2 years ago

Depends on the keyGenerator. By default, it is just the schema coordinates as this library doesn't make any assumptions about the server/context it is running under. See the context example on limiting per ip.

adavis commented 2 years ago

Ok, thanks!