Skip to content

Commit dca55e3

Browse files
committed
add failing test
1 parent d40f00e commit dca55e3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/utils/tests/mapSchema.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ describe('mapSchema', () => {
8888
expect(newSchema.getQueryType()?.name).toBe('RootQuery');
8989
});
9090

91+
test('map scalar type', () => {
92+
const schema = buildSchema(/* GraphQL */ `
93+
type Query {
94+
_: Boolean
95+
}
96+
`);
97+
98+
mapSchema(schema, {
99+
[MapperKind.SCALAR_TYPE](type) {
100+
const config = type.toConfig();
101+
return new GraphQLScalarType({
102+
...config,
103+
});
104+
},
105+
});
106+
});
107+
91108
const typeDefs = /* GraphQL */ `
92109
directive @schemaDirective(role: String) on SCHEMA
93110
directive @schemaExtensionDirective(role: String) on SCHEMA

0 commit comments

Comments
 (0)