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

Make TypeVisitor result type nullable #1212

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/transforms/visitSchema.ts
Expand Up @@ -33,7 +33,7 @@ export type SchemaVisitor = { [key: string]: TypeVisitor };
export type TypeVisitor = (
type: GraphQLType,
schema: GraphQLSchema,
) => GraphQLNamedType;
) => GraphQLNamedType | null | undefined;

export function visitSchema(
schema: GraphQLSchema,
Expand All @@ -57,7 +57,7 @@ export function visitSchema(
const specifiers = getTypeSpecifiers(type, schema);
const typeVisitor = getVisitor(visitor, specifiers);
if (typeVisitor) {
const result: GraphQLNamedType | null | undefined = typeVisitor(
const result = typeVisitor(
type,
schema,
);
Expand Down