Dynamic schema based on directive #481
Unanswered
markmashworth
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm in the process of migrating a service from graphql-java to DGS and I've hit a roadblock. Currently, we use an
@internal
directive on fields we don't want exposed to external users. We create two GraphQL beans for each set of users, with fields annotated with @internal being removed from the schema for the public version. Then we use whichever GraphQL bean we need depending on the user making the request. I'm struggling because DGS ignores these and uses its own GraphQL bean. What would be the best way to hook into the DGS framework to achieve this behavior?To give you a better idea, this is how we configure the GraphQL beans.
Then we serve whichever is appropriate in our Graphql Invocation implementation
Beta Was this translation helpful? Give feedback.
All reactions