|
1 |
| -import { devAssert } from '../jsutils/devAssert'; |
2 | 1 | import { inspect } from '../jsutils/inspect';
|
3 | 2 | import { invariant } from '../jsutils/invariant';
|
4 | 3 | import { isAsyncIterable } from '../jsutils/isAsyncIterable';
|
@@ -239,21 +238,9 @@ function buildResponse(
|
239 | 238 | * TODO: consider no longer exporting this function
|
240 | 239 | * @internal
|
241 | 240 | */
|
242 |
| -export function assertValidExecutionArguments( |
243 |
| - schema: GraphQLSchema, |
244 |
| - document: DocumentNode, |
245 |
| - rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, |
246 |
| -): void { |
247 |
| - devAssert(document != null, 'Must provide document.'); |
248 |
| - |
| 241 | +export function assertValidExecutionArguments(schema: GraphQLSchema): void { |
249 | 242 | // If the schema used for execution is invalid, throw an error.
|
250 | 243 | assertValidSchema(schema);
|
251 |
| - |
252 |
| - // Variables, if provided, must be an object. |
253 |
| - devAssert( |
254 |
| - rawVariableValues == null || isObjectLike(rawVariableValues), |
255 |
| - 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.', |
256 |
| - ); |
257 | 244 | }
|
258 | 245 |
|
259 | 246 | /**
|
@@ -281,7 +268,7 @@ export function buildExecutionContext(
|
281 | 268 | } = args;
|
282 | 269 |
|
283 | 270 | // If arguments are missing or incorrect, throw an error.
|
284 |
| - assertValidExecutionArguments(schema, document, rawVariableValues); |
| 271 | + assertValidExecutionArguments(schema); |
285 | 272 |
|
286 | 273 | let operation: OperationDefinitionNode | undefined;
|
287 | 274 | const fragments: ObjMap<FragmentDefinitionNode> = Object.create(null);
|
|
0 commit comments