Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/utils/tests/mapSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ describe('mapSchema', () => {
expect(newSchema.getQueryType()?.name).toBe('RootQuery');
});

test('map scalar type', () => {
const schema = buildSchema(/* GraphQL */ `
type Query {
_: Boolean
}
`);

mapSchema(schema, {
[MapperKind.SCALAR_TYPE](type) {
const config = type.toConfig();
return new GraphQLScalarType({
...config,
});
},
});
});

const typeDefs = /* GraphQL */ `
directive @schemaDirective(role: String) on SCHEMA
directive @schemaExtensionDirective(role: String) on SCHEMA
Expand Down