Skip to content

Commit 534033d

Browse files
IvanGoncharovyaacovCR
authored andcommitted
Remove 'assertValidExecutionArguments' function (graphql#3643)
After we drop runtime typechecks that were duplicating TS types this function became a wrapper for 'assertValidSchema' so all implementations that rely on it can now use 'assertValidSchema' directly.
1 parent d81b1fc commit 534033d

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/execution/execute.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,18 +236,6 @@ function buildResponse(
236236
return errors.length === 0 ? { data } : { errors, data };
237237
}
238238

239-
/**
240-
* Essential assertions before executing to provide developer feedback for
241-
* improper use of the GraphQL library.
242-
*
243-
* TODO: consider no longer exporting this function
244-
* @internal
245-
*/
246-
export function assertValidExecutionArguments(schema: GraphQLSchema): void {
247-
// If the schema used for execution is invalid, throw an error.
248-
assertValidSchema(schema);
249-
}
250-
251239
/**
252240
* Constructs a ExecutionContext object from the arguments passed to
253241
* execute, which we will pass throughout the other execution methods.
@@ -273,8 +261,8 @@ export function buildExecutionContext(
273261
options,
274262
} = args;
275263

276-
// If arguments are missing or incorrect, throw an error.
277-
assertValidExecutionArguments(schema);
264+
// If the schema used for execution is invalid, throw an error.
265+
assertValidSchema(schema);
278266

279267
let operation: OperationDefinitionNode | undefined;
280268
const fragments: ObjMap<FragmentDefinitionNode> = Object.create(null);

0 commit comments

Comments
 (0)