-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Scalar #4
Comments
I tried to follow this tutorial, but I could not make it work with this framework. |
There are two options in bootstrap({
customResolvers: {
/// ... your resolvers
},
customTypeDefs: `
/// ... your type defs (scalars and others)
`
}); |
I'm trying to use it like this: import { GraphQLDate, GraphQLTime, GraphQLDateTime } from 'graphql-iso-date';
bootstrap({
customTypeDefs: [GraphQLDate, GraphQLTime, GraphQLDateTime],
}); but I got this error:
Am I using it wrong? Is there a example? I didn't find any in the documentation. |
No, sorry I copy/pasted that block, actually |
Finally I could make it work, final code: bootstrap({
customResolvers: {
Date: GraphQLDate,
Time: GraphQLTime,
DateTime: GraphQLDateTime,
},
}) |
Thanks to @jvbianchi , I got mine working. I also got https://github.com/taion/graphql-type-json work in the same way except I have to declare |
How can I add some custom Scalar like Date, Time, JSON and Enum?
The text was updated successfully, but these errors were encountered: