Skip to content

Commit cdf60fe

Browse files
committed
Make TypeVisitor result type nullable
1 parent 9bfb11c commit cdf60fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transforms/visitSchema.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type SchemaVisitor = { [key: string]: TypeVisitor };
3333
export type TypeVisitor = (
3434
type: GraphQLType,
3535
schema: GraphQLSchema,
36-
) => GraphQLNamedType;
36+
) => GraphQLNamedType | null | undefined;
3737

3838
export function visitSchema(
3939
schema: GraphQLSchema,
@@ -57,7 +57,7 @@ export function visitSchema(
5757
const specifiers = getTypeSpecifiers(type, schema);
5858
const typeVisitor = getVisitor(visitor, specifiers);
5959
if (typeVisitor) {
60-
const result: GraphQLNamedType | null | undefined = typeVisitor(
60+
const result = typeVisitor(
6161
type,
6262
schema,
6363
);

0 commit comments

Comments
 (0)