Skip to content

Commit 1ce6880

Browse files
committed
Only allow GraphQLSemanticNonNull of output type
1 parent a2169ac commit 1ce6880

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/type/definition.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ export class GraphQLSemanticNonNull<T extends GraphQLNullableOutputType> {
483483
isNullableType(ofType),
484484
`Expected ${inspect(ofType)} to be a GraphQL nullable type.`,
485485
);
486+
devAssert(
487+
isOutputType(ofType),
488+
`Expected ${inspect(ofType)} to be a GraphQL output type.`,
489+
);
486490

487491
this.ofType = ofType;
488492
}

0 commit comments

Comments
 (0)