Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update remaining GraphQLNonNull<GraphQLType> codepoints to GraphQLNonNull<GraphQLNullableType> #3622

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/type/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ export function isNonNullType(
return instanceOf(type, GraphQLNonNull);
}

export function assertNonNullType(type: unknown): GraphQLNonNull<GraphQLType> {
export function assertNonNullType(
type: unknown,
): GraphQLNonNull<GraphQLNullableType> {
if (!isNonNullType(type)) {
throw new Error(`Expected ${inspect(type)} to be a GraphQL Non-Null type.`);
}
Expand Down Expand Up @@ -395,7 +397,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