diff --git a/src/utilities/__tests__/printSchema-test.ts b/src/utilities/__tests__/printSchema-test.ts index 84f30fc0e2..d09153a2e6 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -276,6 +276,22 @@ describe('Type System Printer', () => { `); }); + it('Omits schema of common names', () => { + const schema = new GraphQLSchema({ + query: new GraphQLObjectType({ name: 'Query', fields: {} }), + mutation: new GraphQLObjectType({ name: 'Mutation', fields: {} }), + subscription: new GraphQLObjectType({ name: 'Subscription', fields: {} }), + }); + + expectPrintedSchema(schema).to.equal(dedent` + type Query + + type Mutation + + type Subscription + `); + }); + it('Prints custom query root types', () => { const schema = new GraphQLSchema({ query: new GraphQLObjectType({ name: 'CustomType', fields: {} }),