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 0da3225 commit b4cf3c3Copy full SHA for b4cf3c3
2 files changed
src/graphql/execution/execute.py
@@ -1483,7 +1483,8 @@ def execute_subscription(
1483
root_type,
1484
context.operation.selection_set,
1485
)
1486
- response_name, field_nodes = next(iter(root_fields.items()))
+ first_root_field = next(iter(root_fields.items()))
1487
+ response_name, field_nodes = first_root_field
1488
field_name = field_nodes[0].name.value
1489
field_def = schema.get_field(root_type, field_name)
1490
src/graphql/validation/rules/single_field_subscriptions.py
@@ -70,8 +70,7 @@ def enter_operation_definition(
70
71
72
for field_nodes in fields.values():
73
- field = field_nodes[0]
74
- field_name = field.name.value
+ field_name = field_nodes[0].name.value
75
if field_name.startswith("__"):
76
self.report_error(
77
GraphQLError(
0 commit comments