You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scalars within input objects cannot be parsed in MethodFieldResolver #466
As described in graphql-java-kickstart/graphql-spring-boot#404 scalars work fine by themselves (or as an array) but not if they are defined as a field on an input object.
This is because for input objects shouldValueBeConverted is false and we try to use the object mapper to parse them.
If the mapper doesn't know how to parse that scalar, and there's no reason it should, it will fail (this can be worked around by providing a deserializer with the mapper through the objectMapperProvider option but probably not the solution we're looking for).
java.lang.IllegalArgumentException: Cannot construct instance of `javax.servlet.http.Part` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: graphql.kickstart.tools.FileInput["part"])
Activity
oryan-block commentedon Jan 25, 2021
I've proposed two possible workarounds for this issue:
https://gist.github.com/oryan-block/7630eb6d352778164c7fbdbb45e24265
One of which is the aforementioned deserializer idea.
PhilippS93 commentedon Mar 26, 2021
@oryan-block, do you know, when the proposed workaround will be merged into to library?
oryan-block commentedon Mar 29, 2021
@PhilippS93 the workaround doesn't require changes to the library. It's all on the client side.
oryan-block commentedon Jun 18, 2021
Added this to the known issues page.