diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 9f9f6e4cd1..be0323ca76 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -231,18 +231,6 @@ function buildResponse( return errors.length === 0 ? { data } : { errors, data }; } -/** - * Essential assertions before executing to provide developer feedback for - * improper use of the GraphQL library. - * - * TODO: consider no longer exporting this function - * @internal - */ -export function assertValidExecutionArguments(schema: GraphQLSchema): void { - // If the schema used for execution is invalid, throw an error. - assertValidSchema(schema); -} - /** * Constructs a ExecutionContext object from the arguments passed to * execute, which we will pass throughout the other execution methods. @@ -267,8 +255,8 @@ export function buildExecutionContext( subscribeFieldResolver, } = args; - // If arguments are missing or incorrect, throw an error. - assertValidExecutionArguments(schema); + // If the schema used for execution is invalid, throw an error. + assertValidSchema(schema); let operation: OperationDefinitionNode | undefined; const fragments: ObjMap = Object.create(null);