Skip to content

How to restrict access to queries #666

Answered by rafalp
iAlexMili asked this question in Q&A
Discussion options

You must be logged in to vote

Your MyObjectDirective.visit_object is not run against the resolvers on Query type, but instead on resolvers on MyObject fields.

What you are after doesn't seem like something that can be achieved out of the box with SchemaDirectiveVisitor. You will have to write custom logic that would walk the schema object and wrap resolvers returning MyObject with custom resolver checking permissions.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@iAlexMili
Comment options

@rafalp
Comment options

@iAlexMili
Comment options

Answer selected by iAlexMili
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants