Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally don't expose schema? #237

Open
molexx opened this issue Jan 21, 2020 · 3 comments
Open

Optionally don't expose schema? #237

molexx opened this issue Jan 21, 2020 · 3 comments

Comments

@molexx
Copy link
Contributor

molexx commented Jan 21, 2020

Do all clients need to inspect the schema at runtime?

If not would it be possible to optionally not expose the schema? If so I'd probably want to do that in production.

@igdianov
Copy link
Collaborator

@molexx It makes sense. I can add configuration property to GraphQLJpExecutor to apply NoIntrospectionGraphqlFieldVisibility to the schema if enabled.

@igdianov
Copy link
Collaborator

igdianov commented Feb 3, 2020

@molexx This should be possible to achieve with NoIntrospectionGraphqlFieldVisibility implementation that already exists in Graphql Java:

https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/schema/visibility/NoIntrospectionGraphqlFieldVisibility.java#L17

After fixing GH-239, it should be possible to apply NoIntrospectionGraphqlFieldVisibility via Supplier instrumentation per request.

@molexx
Copy link
Contributor Author

molexx commented Feb 3, 2020

Yes, tested with #239 and NO_INTROSPECTION_FIELD_VISIBILITY following the example with a @RequestScope Supplier<GraphqlFieldVisibility. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants