Skip to content

Commit a331351

Browse files
committed
refactor: move assert_valid_execution_arguments into ExecutionContext.build
Replicates graphql/graphql-js@2f91eb8
1 parent b8190cc commit a331351

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/graphql/execution/execute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ def build(
250250
251251
For internal use only.
252252
"""
253+
# If arguments are missing or incorrect, throw an error.
254+
assert_valid_execution_arguments(schema, document, raw_variable_values)
255+
253256
operation: Optional[OperationDefinitionNode] = None
254257
fragments: Dict[str, FragmentDefinitionNode] = {}
255258
middleware_manager: Optional[MiddlewareManager] = None
@@ -988,9 +991,6 @@ def execute(
988991
If the arguments to this function do not result in a legal execution context,
989992
a GraphQLError will be thrown immediately explaining the invalid input.
990993
"""
991-
# If arguments are missing or incorrect, throw an error.
992-
assert_valid_execution_arguments(schema, document, variable_values)
993-
994994
if execution_context_class is None:
995995
execution_context_class = ExecutionContext
996996

0 commit comments

Comments
 (0)