Skip to content

Commit 7d890bf

Browse files
authored
Update graphene/validation/disable_introspection.py
1 parent 0e4c14b commit 7d890bf

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

graphene/validation/disable_introspection.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
class DisableIntrospection(ValidationRule):
99
def enter_field(self, node: FieldNode, *_args):
1010
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,
11+
if is_introspection_key(field_name):
12+
self.report_error(
13+
GraphQLError(
14+
f"Cannot query '{field_name}': introspection is disabled.",
15+
node,
16+
)
1817
)
19-
)

0 commit comments

Comments
 (0)