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
bug: Custom scalar does not deserialize correctly with 4.6.0 #588
Comments
My guess is that you forgot to use the The related change in 4.6.0 is this: #549. Prior to this change, some code that was incorrect was accidentally "working" because of the extra conversion Jackson was doing. I've added a test specifically for the |
Closing this as |
The test scenario doesn't handle complex input objects with nested lists. If your top level object is not a list, but it contains a list, the objects in the list don't get converted to the correct types. They remain maps and then any logic that uses the values in the list blow up with a class cast exception. I see this issue when there are no custom scalars involved.
|
Thanks for the additional context, let me look into it further. |
To add to @nsnichols 's comment, if you had two list types,
|
Thanks for clarifying the issue - I was obviously looking at the wrong thing and this bug was a huge oversight. Anyway, I think I have a fix for the issue. It's more reflection magic, so we'll need to do some more testing, but it looks promising. The fix is in #591 |
Fix is released in 4.7.0. Hopefully for real this time! |
We have a type defined like this:
scalar Object
is defined as follows:Expected behavior
When calling a mutation with
FooInput
as input, I expect it to deserializebars
asList<BarInput>
.Actual behavior
When calling a mutation with
FooInput
as input, it deserializesbars
asList<LinkedHashMap>
instead ofList<BarInput>
.Steps to reproduce
FooInput
as inputBarInput
is deserialized toLinkedHashMap
(i.e. not successfully deserialized toBarInput
)Might be related to (or fixed by?) this: #344
The text was updated successfully, but these errors were encountered: