Omit DateTime scalar from built schema #1333
Unanswered
robinelvin
asked this question in
Q&A
Replies: 1 comment 4 replies
-
https://typegraphql.com/docs/scalars.html#custom-scalars const schema = await buildSchema({
resolvers,
scalarsMap: [{ type: Date, scalar: DifferentDateTimeScalar }],
}); |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using TypeGraphQL to generate schema which is being passed to Neo4jGraphQL. Since both libraries define a
DateTime
scalar this throws a schema error. My initial workaround was to generate the schema string and remove the scalar definition but the string output omits the directives I need.Is there a way to omit the DateTime scalar from the
buildSchema
operation?EDIT:
I am being stupid. From Emitting the schema SDL I can see there is a method you can use called
printSchemaWithDirectives
This is now working although it would be nice if the schema did not have to be converted to a string in order to remove the scalar definition.Beta Was this translation helpful? Give feedback.
All reactions