Defining Rate Limits
You can define your own rate limits by adding arateLimits array to a Module. Each rule specifies a bucket name, the type of actor being limited (ip or user), a time window, and a maximum number of allowed calls within that window.
Consuming a Rate Limit
CallconsumeRateLimit inside a mutation or query handler to check and increment the rate limit counter. It throws a RateLimitError automatically when any matching rule is exceeded:
message parameter lets you provide a user-facing error message instead of the default: