File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -1319,20 +1319,36 @@ describe('Introspection', () => {
1319
1319
} ) ;
1320
1320
} ) ;
1321
1321
1322
- it ( 'executes an introspection query without calling global fieldResolver ' , ( ) => {
1322
+ it ( 'executes an introspection query without calling global resolvers ' , ( ) => {
1323
1323
const schema = buildSchema ( `
1324
1324
type Query {
1325
1325
someField: String
1326
1326
}
1327
1327
` ) ;
1328
1328
1329
- const source = getIntrospectionQuery ( { directiveIsRepeatable : true } ) ;
1329
+ const source = getIntrospectionQuery ( {
1330
+ specifiedByUrl : true ,
1331
+ directiveIsRepeatable : true ,
1332
+ schemaDescription : true ,
1333
+ } ) ;
1330
1334
1331
1335
// istanbul ignore next (Called only to fail test)
1332
1336
function fieldResolver ( _1 , _2 , _3 , info ) {
1333
1337
invariant ( false , `Called on ${ info . parentType . name } ::${ info . fieldName } ` ) ;
1334
1338
}
1335
1339
1336
- expect ( ( ) => graphqlSync ( { schema, source, fieldResolver } ) ) . to . not . throw ( ) ;
1340
+ // istanbul ignore next (Called only to fail test)
1341
+ function typeResolver ( _1 , _2 , info ) {
1342
+ invariant ( false , `Called on ${ info . parentType . name } ::${ info . fieldName } ` ) ;
1343
+ }
1344
+
1345
+ expect ( ( ) =>
1346
+ graphqlSync ( {
1347
+ schema,
1348
+ source,
1349
+ fieldResolver,
1350
+ typeResolver,
1351
+ } ) ,
1352
+ ) . to . not . throw ( ) ;
1337
1353
} ) ;
1338
1354
} ) ;
You can’t perform that action at this time.
0 commit comments