Skip to content

Commit ffab536

Browse files
committed
Remove assert_valid_execution_arguments function
Replicates graphql/graphql-js@cfbc023
1 parent 1062cbb commit ffab536

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

src/graphql/execution/execute.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565

6666

6767
__all__ = [
68-
"assert_valid_execution_arguments",
6968
"create_source_event_stream",
7069
"default_field_resolver",
7170
"default_type_resolver",
@@ -250,8 +249,8 @@ def build(
250249
251250
For internal use only.
252251
"""
253-
# If arguments are missing or incorrect, throw an error.
254-
assert_valid_execution_arguments(schema)
252+
# If the schema used for execution is invalid, raise an error.
253+
assert_valid_schema(schema)
255254

256255
operation: Optional[OperationDefinitionNode] = None
257256
fragments: Dict[str, FragmentDefinitionNode] = {}
@@ -1112,20 +1111,6 @@ def execute_sync(
11121111
return cast(ExecutionResult, result)
11131112

11141113

1115-
def assert_valid_execution_arguments(
1116-
schema: GraphQLSchema,
1117-
) -> None:
1118-
"""Check that the arguments are acceptable.
1119-
1120-
Essential assertions before executing to provide developer feedback for improper use
1121-
of the GraphQL library.
1122-
1123-
For internal use only.
1124-
"""
1125-
# If the schema used for execution is invalid, throw an error.
1126-
assert_valid_schema(schema)
1127-
1128-
11291114
def invalid_return_type_error(
11301115
return_type: GraphQLObjectType, result: Any, field_nodes: List[FieldNode]
11311116
) -> GraphQLError:
@@ -1340,10 +1325,6 @@ def create_source_event_stream(
13401325
separating these two steps. For more on this, see the "Supporting Subscriptions
13411326
at Scale" information in the GraphQL spec.
13421327
"""
1343-
# If arguments are missing or incorrectly typed, this is an internal developer
1344-
# mistake which should throw an early error.
1345-
assert_valid_execution_arguments(schema)
1346-
13471328
if not execution_context_class:
13481329
execution_context_class = ExecutionContext
13491330

0 commit comments

Comments
 (0)