We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e4c14b commit 7d890bfCopy full SHA for 7d890bf
graphene/validation/disable_introspection.py
@@ -8,12 +8,10 @@
8
class DisableIntrospection(ValidationRule):
9
def enter_field(self, node: FieldNode, *_args):
10
field_name = node.name.value
11
- if not is_introspection_key(field_name):
12
- return
13
-
14
- self.report_error(
15
- GraphQLError(
16
- f"Cannot query '{field_name}': introspection is disabled.",
17
- node,
+ if is_introspection_key(field_name):
+ self.report_error(
+ GraphQLError(
+ f"Cannot query '{field_name}': introspection is disabled.",
+ node,
+ )
18
)
19
- )
0 commit comments