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
I am trying to implement a rate limiter for my GraphQL server. The way I am implementing is that each query will be mapped (by its name) to a rate limit configuration. This enables me to configure each GraphQL query differently to throttle it.
Using the info object in a middleware, I was able to get the name of the main query, but I was not able to see the name of the stitched query (or queries).
If there was a way to get the name of the stitched queries from info object, or, via any other mechanism, it'd be good.
So, I have checked the documentation, tried info object in the middleware. Nothing has worked for me, so far.
Example:
{
locations {
name
reviewsForLocation {
rating
}
}
}
Here, the main query is locations and the stitched query is reviewsForLocation. I'd like to get the name of both the queries (types) in the middleware.
The text was updated successfully, but these errors were encountered:
I am trying to implement a rate limiter for my GraphQL server. The way I am implementing is that each query will be mapped (by its name) to a rate limit configuration. This enables me to configure each GraphQL query differently to throttle it.
Using the
info
object in a middleware, I was able to get the name of the main query, but I was not able to see the name of the stitched query (or queries).If there was a way to get the name of the stitched queries from
info
object, or, via any other mechanism, it'd be good.So, I have checked the documentation, tried
info
object in the middleware. Nothing has worked for me, so far.Example:
Here, the main query is
locations
and the stitched query isreviewsForLocation
. I'd like to get the name of both the queries (types) in the middleware.The text was updated successfully, but these errors were encountered: