Skip to content

Commit c6b8dca

Browse files
committed
Fix registering custom scalars that don't have an internal type
1 parent fed5b3f commit c6b8dca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/scalars.resolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ for (const scalar of getRegisteredScalars()) {
2222
const typeFn =
2323
scalar instanceof GraphQLScalarType
2424
? () => scalar
25-
: Reflect.getMetadata(SCALAR_TYPE_METADATA, scalar);
25+
: Reflect.getMetadata(SCALAR_TYPE_METADATA, scalar) ?? (() => scalar);
2626

2727
const key = `unstable_stub${name}`;
2828
const cls = ScalarResolver.prototype as any;

0 commit comments

Comments
 (0)