We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def26e6 commit faa42e2Copy full SHA for faa42e2
src/utilities/__tests__/printSchema-test.ts
@@ -276,6 +276,22 @@ describe('Type System Printer', () => {
276
`);
277
});
278
279
+ it('Omits schema of common names', () => {
280
+ const schema = new GraphQLSchema({
281
+ query: new GraphQLObjectType({ name: 'Query', fields: {} }),
282
+ mutation: new GraphQLObjectType({ name: 'Mutation', fields: {} }),
283
+ subscription: new GraphQLObjectType({ name: 'Subscription', fields: {} }),
284
+ });
285
+
286
+ expectPrintedSchema(schema).to.equal(dedent`
287
+ type Query
288
289
+ type Mutation
290
291
+ type Subscription
292
+ `);
293
294
295
it('Prints custom query root types', () => {
296
const schema = new GraphQLSchema({
297
query: new GraphQLObjectType({ name: 'CustomType', fields: {} }),
0 commit comments