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 4d0bcde commit ac3cb10Copy full SHA for ac3cb10
src/utilities/printSchema.ts
@@ -115,6 +115,15 @@ function isSchemaOfCommonNames(schema: GraphQLSchema): boolean {
115
const mutationOperationType = schema.getMutationType() ?? null;
116
const subscriptionOperationType = schema.getSubscriptionType() ?? null;
117
118
+ // Special case for when there are no operation types
119
+ if (
120
+ !queryOperationType &&
121
+ !mutationOperationType &&
122
+ !subscriptionOperationType
123
+ ) {
124
+ return true;
125
+ }
126
+
127
const queryType = schema.getType('Query') ?? null;
128
const mutationType = schema.getType('Mutation') ?? null;
129
const subscriptionType = schema.getType('Subscription') ?? null;
0 commit comments