File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { assert, expect } from 'chai';
22import { describe , it } from 'mocha' ;
33
44import { dedent } from '../../__testUtils__/dedent.js' ;
5+ import { viralSDL } from '../../__testUtils__/viralSDL.js' ;
56
67import type { Maybe } from '../../jsutils/Maybe.js' ;
78
@@ -1092,4 +1093,14 @@ describe('Schema Builder', () => {
10921093 'Unknown type: "UnknownType".' ,
10931094 ) ;
10941095 } ) ;
1096+
1097+ it ( 'correctly processes viral schema' , ( ) => {
1098+ const schema = buildSchema ( viralSDL ) ;
1099+ expect ( schema . getQueryType ( ) ) . to . contain ( { name : 'Query' } ) ;
1100+ expect ( schema . getType ( 'Virus' ) ) . to . contain ( { name : 'Virus' } ) ;
1101+ expect ( schema . getType ( 'Mutation' ) ) . to . contain ( { name : 'Mutation' } ) ;
1102+ // Though the viral schema has a 'Mutation' type, it is not used for the
1103+ // 'mutation' operation.
1104+ expect ( schema . getMutationType ( ) ) . to . equal ( undefined ) ;
1105+ } ) ;
10951106} ) ;
You can’t perform that action at this time.
0 commit comments