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';
2
2
import { describe , it } from 'mocha' ;
3
3
4
4
import { dedent } from '../../__testUtils__/dedent.js' ;
5
+ import { viralSDL } from '../../__testUtils__/viralSDL.js' ;
5
6
6
7
import type { Maybe } from '../../jsutils/Maybe.js' ;
7
8
@@ -1092,4 +1093,14 @@ describe('Schema Builder', () => {
1092
1093
'Unknown type: "UnknownType".' ,
1093
1094
) ;
1094
1095
} ) ;
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
+ } ) ;
1095
1106
} ) ;
You can’t perform that action at this time.
0 commit comments