Need help with stitched schema in federation

I am trying to implement a rate limiter on graphql queries, with apollo gateway that defines schemas using federation.
The rate limiting will be applied on the basis of using query names as the key. But in case of stitched graphql calls, i am not able to achieve this.

With the locations and reviews example given in documentation

{
locations {
name
reviewsForLocation {
rating
}
}
}

i need to get the names “locations” and “reviewsForLocation”, so that i can use these as keys in my rate limiting logic.

Also, is it possible to apply graphql-middleware in federation? So that i might be able to check if the middleware is called as many times as the no. of stitched queries.