-
Notifications
You must be signed in to change notification settings - Fork 159
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
Think about custom scalars that aren't strings #9
Comments
After a new reading it seems that yes, it is allowed (it just says that custom scalars should have a string representation, presumably for allowing embedding them into JSON). What is the best way to allow for maximum flexibility there? If we have a custom scalar called I think it would probably be better to leave that out, and allow users to inject |
Relevant section from the spec: https://github.com/facebook/graphql/blob/master/spec/Section%203%20--%20Type%20System.md#scalars |
apollo-codegen has that
|
There is also an RFC to allow the serialization type of a custom scalar to be defined: graphql/graphql-spec#326 |
We should definitely support that when it makes it into the spec, thanks for the link! |
Custom target types for custom scalars are implemented in #74 |
This is implemented, let's move the discussion on the RFC to #75 |
I am not clear on whether the spec allows that.
The text was updated successfully, but these errors were encountered: