Skip to content

Commit abaa127

Browse files
committed
refactor: remove root_value argument from execute_operation
Replicates graphql/graphql-js@75286fe
1 parent a331351 commit abaa127

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/graphql/execution/execute.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def build_response(
333333
return ExecutionResult(data, errors)
334334

335335
def execute_operation(
336-
self, operation: OperationDefinitionNode, root_value: Any
336+
self, operation: OperationDefinitionNode
337337
) -> Optional[AwaitableOrValue[Any]]:
338338
"""Execute an operation.
339339
@@ -355,13 +355,11 @@ def execute_operation(
355355
operation.selection_set,
356356
)
357357

358-
path = None
359-
360358
return (
361359
self.execute_fields_serially
362360
if operation.operation == OperationType.MUTATION
363361
else self.execute_fields
364-
)(root_type, root_value, path, root_fields)
362+
)(root_type, self.root_value, None, root_fields)
365363

366364
def execute_fields_serially(
367365
self,
@@ -1029,7 +1027,7 @@ def execute(
10291027
build_response = exe_context.build_response
10301028
try:
10311029
operation = exe_context.operation
1032-
result = exe_context.execute_operation(operation, root_value)
1030+
result = exe_context.execute_operation(operation)
10331031

10341032
if exe_context.is_awaitable(result):
10351033
# noinspection PyShadowingNames

0 commit comments

Comments
 (0)