-
Notifications
You must be signed in to change notification settings - Fork 656
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
Add fallback to Object in case if there is no custom scalar type mapping specified #177
Add fallback to Object in case if there is no custom scalar type mapping specified #177
Conversation
Thanks :) |
you can start tagging @brianPlummer for reviews as well fyi. |
case 3: { | ||
contentValues.fieldWithUnsupportedType = (Object) value; | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to have a default label...nitpick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A default case to the switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agh, well this code is generated, so we guarantee that there won't be default case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha! :)
Closes #173
If user didn't specify custom type mapping, Object will be used as java type for fields with GraphQL custom scalar.
As for the parsing response values for such fields it will be decided by json reader, that supports by default only 3 types: Boolean, String, BigDecimal.