Implement __type
/__schema
introspection disabling
#2657
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A question was asked in issue GH-2546 asking whether it was possible to
disable a single introspection entry point considering that #2327 had
implemented then functionality to disable introspection as a whole using
disable_introspection_entry_points
. In the issue, an option was laidout to implement the functionality for individual
disable_schema_introspection_entry_point
anddisable_type_introspection_entry_point
options. This commit implementsthese methods.
These new methods are used in an identical manner to
disable_introspection_entry_points
:Disabling
__type
introspectionWith the above, attempting to execute a query with
__type
introspection will return the following error message:
Disabling
__schema
introspectionWith the above, attempting to execute a query with
__schema
introspection will return the following error message:
Note, having both
disable_type_introspection_entry_point
anddisable_schema_introspection_entry_point
is identical to having justdisable_introspection_entry_points
. Havingdisable_introspection_entry_points
anddisable_type_introspection_entry_point
ordisable_schema_introspection_entry_point
is no different to justhaving
disable_introspection_entry_points
.