Replies: 1 comment 4 replies
-
Does your supergraph contain the authorization directives? In my case, i have custom authorization directives in my subgraph components, but the supergraph drops those directives (at least when i fetch from apollo studio) since the custom directives do not bubble up to the supergraph... This is not an answer :) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm interested in moving authorization from each subgraph provider into the router itself by building a custom plugin to handle this.
The working idea is that since each subgraph will have authz directives annotating the various fields, the router should be able to pick out what directives are "in scope" for an inbound request and execute the appropriate authorization logic.
However, after poking around the custom plugin code a bit, I'm at a loss at how I might be able to access the supergraph from within any of the available
tower
services. Ideally I'd want my plugin to walk the supergraph on startup to path out the various directives and then trigger the auth logic if a request touches any of those paths.Any pointers? I'm also open to alternatives to achieving the same goal 😄
Beta Was this translation helpful? Give feedback.
All reactions