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 a725499 commit 63b9f15Copy full SHA for 63b9f15
src/utilities/typeComparators.js
@@ -63,14 +63,14 @@ export function isTypeSubTypeOf(
63
return true;
64
}
65
66
- // If superType is non-null, maybeSubType must also be nullable.
+ // If superType is non-null, maybeSubType must also be non-null.
67
if (superType instanceof GraphQLNonNull) {
68
if (maybeSubType instanceof GraphQLNonNull) {
69
return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
70
71
return false;
72
} else if (maybeSubType instanceof GraphQLNonNull) {
73
- // If superType is nullable, maybeSubType may be non-null.
+ // If superType is nullable, maybeSubType may be non-null or nullable.
74
return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);
75
76
0 commit comments