@@ -273,7 +273,7 @@ export function extendSchema(
273
273
name : type . name ,
274
274
description : type . description ,
275
275
fields : ( ) => extendFieldMap ( type ) ,
276
- resolveType : throwClientSchemaExecutionError ,
276
+ resolveType : cannotExecuteClientSchema ,
277
277
} ) ;
278
278
}
279
279
@@ -282,7 +282,7 @@ export function extendSchema(
282
282
name : type . name ,
283
283
description : type . description ,
284
284
types : type . getPossibleTypes ( ) . map ( getTypeFromDef ) ,
285
- resolveType : throwClientSchemaExecutionError ,
285
+ resolveType : cannotExecuteClientSchema ,
286
286
} ) ;
287
287
}
288
288
@@ -322,7 +322,7 @@ export function extendSchema(
322
322
deprecationReason : field . deprecationReason ,
323
323
type : extendFieldType ( field . type ) ,
324
324
args : keyMap ( field . args , arg => arg . name ) ,
325
- resolve : throwClientSchemaExecutionError ,
325
+ resolve : cannotExecuteClientSchema ,
326
326
} ;
327
327
} ) ;
328
328
@@ -342,7 +342,7 @@ export function extendSchema(
342
342
newFieldMap [ fieldName ] = {
343
343
type : buildFieldType ( field . type ) ,
344
344
args : buildInputValues ( field . arguments ) ,
345
- resolve : throwClientSchemaExecutionError ,
345
+ resolve : cannotExecuteClientSchema ,
346
346
} ;
347
347
} ) ;
348
348
} ) ;
@@ -384,15 +384,15 @@ export function extendSchema(
384
384
return new GraphQLInterfaceType ( {
385
385
name : typeAST . name . value ,
386
386
fields : ( ) => buildFieldMap ( typeAST ) ,
387
- resolveType : throwClientSchemaExecutionError ,
387
+ resolveType : cannotExecuteClientSchema ,
388
388
} ) ;
389
389
}
390
390
391
391
function buildUnionType ( typeAST : UnionTypeDefinition ) {
392
392
return new GraphQLUnionType ( {
393
393
name : typeAST . name . value ,
394
394
types : typeAST . types . map ( getTypeFromAST ) ,
395
- resolveType : throwClientSchemaExecutionError ,
395
+ resolveType : cannotExecuteClientSchema ,
396
396
} ) ;
397
397
}
398
398
@@ -434,7 +434,7 @@ export function extendSchema(
434
434
field => ( {
435
435
type : buildFieldType ( field . type ) ,
436
436
args : buildInputValues ( field . arguments ) ,
437
- resolve : throwClientSchemaExecutionError ,
437
+ resolve : cannotExecuteClientSchema ,
438
438
} )
439
439
) ;
440
440
}
@@ -464,6 +464,6 @@ export function extendSchema(
464
464
}
465
465
}
466
466
467
- function throwClientSchemaExecutionError ( ) {
467
+ function cannotExecuteClientSchema ( ) {
468
468
throw new Error ( 'Client Schema cannot be used for execution.' ) ;
469
469
}
0 commit comments