File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1033,6 +1033,22 @@ describe('Schema Builder', () => {
10331033 expect ( schema . getSubscriptionType ( ) ) . to . include ( { name : 'Subscription' } ) ;
10341034 } ) ;
10351035
1036+ it ( 'Mixture of default and custom root operation types' , ( ) => {
1037+ const schema = buildSchema ( `
1038+ extend schema {
1039+ query: SomeQuery
1040+ }
1041+ type SomeQuery
1042+ type Query
1043+ type Mutation
1044+ type Subscription
1045+ ` ) ;
1046+
1047+ expect ( schema . getQueryType ( ) ) . to . include ( { name : 'SomeQuery' } ) ;
1048+ expect ( schema . getMutationType ( ) ) . to . include ( { name : 'Mutation' } ) ;
1049+ expect ( schema . getSubscriptionType ( ) ) . to . include ( { name : 'Subscription' } ) ;
1050+ } ) ;
1051+
10361052 it ( 'can build invalid schema' , ( ) => {
10371053 // Invalid schema, because it is missing query root type
10381054 const schema = buildSchema ( 'type Mutation' ) ;
You can’t perform that action at this time.
0 commit comments