Skip to content

The limitation of /graphql/schema #237

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

Closed
dugenkui03 opened this issue Dec 24, 2021 · 1 comment
Closed

The limitation of /graphql/schema #237

dugenkui03 opened this issue Dec 24, 2021 · 1 comment
Labels
status: superseded Issue is superseded by another

Comments

@dugenkui03
Copy link
Contributor

User still can get all the detail about the definition of schema by IntrospectionQuery, and not only ‘Type’ definition but also directive definition.

/graphql/schema seems to be redundant, or IntrospectionQuery also need to be limited as well.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 24, 2021
@bclozel
Copy link
Member

bclozel commented Jan 3, 2022

Enabling/disabling the schema endpoint is not about security, but convenience. In that sense, I don't think we necessarily need to align schema introspection and schema exposure in text format.

People might still want to easily disable introspection, so I've created spring-projects/spring-boot#29248 since the auto-configuration has now moved to the Spring Boot project.

In the meantime, you should be able to achieve just that with the following:

@Bean
public RuntimeWiringConfigurer disableFieldInstrospectionWiringConfigurer() {
	return builder -> builder.fieldVisibility(NoIntrospectionGraphqlFieldVisibility.NO_INTROSPECTION_FIELD_VISIBILITY);
}

I'm closing this issue as it's superseded by the Spring Boot one.

@bclozel bclozel closed this as completed Jan 3, 2022
@bclozel bclozel added status: superseded Issue is superseded by another and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded Issue is superseded by another
Projects
None yet
Development

No branches or pull requests

3 participants