-
Notifications
You must be signed in to change notification settings - Fork 348
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
List's of custom scalar types no longer work as arguments with Jackson 2.10 #635
Comments
@alexsparrow Can you verify that you can run #636 locally? I checked out from the master branch I am not seeing any errors and we are running on jackson 2.10.2 Do you happen to be running groovy? I found this issue related to something similar https://bugs.openjdk.java.net/browse/JDK-8218540 |
Hey @smyrick thanks for the response and the tests! I left a couple of comments on your PR. I don't think I'm running groovy (and definitely for the code that's causing the error). |
@alexsparrow Ah, yes. I see now. It seems that we lose the information for converting custom scalars. We only added support for lists as input types in this PR: #546 If you change the type to |
@alexsparrow I found the issue. It was infact in |
Awesome thanks a lot for looking into this. The bug fix looks good and the workaround with |
Fixed in #636 |
Library Version
2.0.0-RC10
Describe the bug
As noted in #518, the behaviour of
convertValue
appears to have changed in Jackson 2.10 so that it no longer short-circuits when the input value is already of a suitable type.For my use case, this causes an issue when a function on my
TopLevelObject
takes a list of non-primitive types e.g.I have registered
UUID
as a scalar type usingSchemaGeneratorHooks
and defined a suitableCoercing
for it.With Jackson 2.9.X, this works as expected.
With Jackson 2.10.X, when I try to query this function, I get an exception like:
I believe this is due to the usage of
convertValue
inFunctionDataFetcher.convertParameterValue
. In Jackson 2.10.X the list will always go through a serialization/deserialization step, losing the type information.To Reproduce
See above.
Expected behavior
Expect the
List<UUID>
to be forwarded as-is to my function.Thanks for any help :-)
The text was updated successfully, but these errors were encountered: