@@ -154,8 +154,7 @@ export function execute(
154
154
/* eslint-enable no-param-reassign, no-redeclare */
155
155
}
156
156
157
- // If a valid context cannot be created due to incorrect arguments,
158
- // this will throw an error.
157
+ // If arguments are missing or incorrect, throw an error.
159
158
assertValidExecutionArguments (
160
159
schema ,
161
160
document ,
@@ -259,22 +258,6 @@ export function buildExecutionContext(
259
258
operationName: ?string,
260
259
fieldResolver: ?GraphQLFieldResolver< any , any >
261
260
): ExecutionContext {
262
- invariant ( schema , 'Must provide schema' ) ;
263
- invariant ( document , 'Must provide document' ) ;
264
- invariant (
265
- schema instanceof GraphQLSchema ,
266
- 'Schema must be an instance of GraphQLSchema. Also ensure that there are ' +
267
- 'not multiple versions of GraphQL installed in your node_modules directory.'
268
- ) ;
269
-
270
- // Variables, if provided, must be an object.
271
- invariant (
272
- ! rawVariableValues || typeof rawVariableValues === 'object' ,
273
- 'Variables must be provided as an Object where each property is a ' +
274
- 'variable value. Perhaps look to see if an unparsed JSON string ' +
275
- 'was provided.'
276
- ) ;
277
-
278
261
const errors : Array < GraphQLError > = [ ] ;
279
262
let operation : ?OperationDefinitionNode ;
280
263
const fragments : { [ name : string ] : FragmentDefinitionNode } =
0 commit comments