Skip to content

Commit

Permalink
Make TypeVisitor result type nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
pelepelin committed Oct 3, 2019
1 parent 9bfb11c commit d911dd4
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit d911dd4

Please sign in to comment.