Skip to content

Commit cfbc023

Browse files
Remove 'assertValidExecutionArguments' function (#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 a4b085b commit cfbc023

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/execution/execute.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -231,18 +231,6 @@ function buildResponse(
231231
return errors.length === 0 ? { data } : { errors, data };
232232
}
233233

234-
/**
235-
* Essential assertions before executing to provide developer feedback for
236-
* improper use of the GraphQL library.
237-
*
238-
* TODO: consider no longer exporting this function
239-
* @internal
240-
*/
241-
export function assertValidExecutionArguments(schema: GraphQLSchema): void {
242-
// If the schema used for execution is invalid, throw an error.
243-
assertValidSchema(schema);
244-
}
245-
246234
/**
247235
* Constructs a ExecutionContext object from the arguments passed to
248236
* execute, which we will pass throughout the other execution methods.
@@ -267,8 +255,8 @@ export function buildExecutionContext(
267255
subscribeFieldResolver,
268256
} = args;
269257

270-
// If arguments are missing or incorrect, throw an error.
271-
assertValidExecutionArguments(schema);
258+
// If the schema used for execution is invalid, throw an error.
259+
assertValidSchema(schema);
272260

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

0 commit comments

Comments
 (0)