We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3283f8a commit af87956Copy full SHA for af87956
src/utilities/__tests__/printSchema-test.ts
@@ -1018,4 +1018,22 @@ describe('Type System Printer', () => {
1018
const printed = printSchema(viralSchema);
1019
expect(printed).to.equal(viralSDL);
1020
});
1021
+ it('prints schema with description and default root operation types correctly', () => {
1022
+ const Query = new GraphQLObjectType({
1023
+ name: 'Query',
1024
+ fields: { a: { type: GraphQLInt } },
1025
+ });
1026
+ const schema = new GraphQLSchema({ query: Query, description: 'Test' });
1027
+ const printed = printSchema(schema);
1028
+ expect(printed).to.equal(dedent`
1029
+ """Test"""
1030
+ schema {
1031
+ query: Query
1032
+ }
1033
+
1034
+ type Query {
1035
+ a: Int
1036
1037
+ `);
1038
1039
0 commit comments