Skip to content

Commit

Permalink
fix GraphQLWrappingType
Browse files Browse the repository at this point in the history
GraphQLNonNull wrapper can only be applies to nullable types

related: graphql#3597
see also: graphql#3617 (comment)
  • Loading branch information
yaacovCR committed May 31, 2022
1 parent 338e3dd commit a5213b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/type/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export class GraphQLNonNull<T extends GraphQLNullableType> {

export type GraphQLWrappingType =
| GraphQLList<GraphQLType>
| GraphQLNonNull<GraphQLType>;
| GraphQLNonNull<GraphQLNullableType>;

export function isWrappingType(type: unknown): type is GraphQLWrappingType {
return isListType(type) || isNonNullType(type);
Expand Down

0 comments on commit a5213b4

Please sign in to comment.