cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

Fine grained rate limiting and query depth limit for feature flags

Open dimond-nl opened this issue 6 months ago • 2 comments
trafficstars

Component(s)

router

Is your feature request related to a problem? Please describe.

Currently rate limiting and query depth limits works on the entire router when configuring it, however this becomes a problem when the user needs a more strict policy only for the subgraphs in a feature flag so that we have better control of the use of the endpoint.

Describe the solution you'd like

Just a router configuration that allows something like

rate-limit:
enable-custom-policy: true
header: feature-flag-1
policy...
header:feature-flag-2
policy....

query-depth:
enable-custom-policy: true
header: feature-flag-1
max-depth: 5
max-complexity:100
header:feature-flag-2
max-depth: 10
max-complexity:250

Describe alternatives you've considered

No response

Additional context

https://discord.com/channels/738739428314316823/1143223629690183802/1366353095965016107

dimond-nl avatar Apr 28 '25 10:04 dimond-nl