Skip to content

Commit 82ab828

Browse files
committed
Fixed execution class execution
1 parent a003063 commit 82ab828

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

graphql/execution/execute.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def execute(
6969
variable_values: Dict[str, Any]=None,
7070
operation_name: str=None,
7171
field_resolver: GraphQLFieldResolver=None,
72-
execution_context_class: Type[ExecutionContext]=ExecutionContext,
73-
middleware: Middleware=None
72+
middleware: Middleware=None,
73+
execution_context_class: Type['ExecutionContext']=None,
7474
) -> MaybeAwaitable[ExecutionResult]:
7575
"""Execute a GraphQL operation.
7676
@@ -86,6 +86,9 @@ def execute(
8686
# If arguments are missing or incorrect, throw an error.
8787
assert_valid_execution_arguments(schema, document, variable_values)
8888

89+
if execution_context_class is None:
90+
execution_context_class = ExecutionContext
91+
8992
# If a valid execution context cannot be created due to incorrect
9093
# arguments, a "Response" with only errors is returned.
9194
exe_context = execution_context_class.build(

0 commit comments

Comments
 (0)