Replies: 2 comments 5 replies
-
The mechanism used to disable introspection is an additional validation rule, which is awkward to support this (validation rules are supposed to only depend on the operation and the schema so that we can cache the successful result of validation, not on other aspects of the request). We could change that implementation so that there's a special introspection validation phase though. Note that graphql-js is considering having direct support for disabling introspection (including also disabling "did you mean?" suggestions) which would be nice though we'd still have to hook into it somehow. For example, we could allow you to pass a function (which would take GraphQLRequestContext) for |
Beta Was this translation helpful? Give feedback.
-
See how I configured to only allow public access to IntrospectionQuery: MichalLytek/type-graphql#1308 (comment) If you do your custom logic in if statement |
Beta Was this translation helpful? Give feedback.
-
Is there a way to enable introspection but only for select users?
Beta Was this translation helpful? Give feedback.
All reactions