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
I'd love to use my custom HandlerMethodArgumentResolver as now supported in main.
However, custom argument resolvers comes LAST, therefore code using the input object described above fails on exception while default binder is trying to deserialize it using constructor deserializer.
The text was updated successfully, but these errors were encountered:
This is for an @Argument method parameter? Currently GraphQlArgumentBinder does not expose object creation. That's what #521 aims to do. So will your custom argument resolver replace the one for @Argument completely? In which case, a custom annotation, e.g. @JsonArgument makes sense, and built-in resolvers will not interfere.
Generally in Spring MVC and elsewhere we order custom resolvers after the built-in ones, and instead of replacing them completely, we try to provide the necessary control over their behavior. That way the built-in method parameters have a predictable, well-known behavior, and if that doesn't work for you, then you can create your own, but keeping that separate in the programming model.
We have DTOs shared across Graphql and REST, using JSON, with constructors like this:
I'd love to use my custom
HandlerMethodArgumentResolver
as now supported in main.However, custom argument resolvers comes LAST, therefore code using the input object described above fails on exception while default binder is trying to deserialize it using constructor deserializer.
The text was updated successfully, but these errors were encountered: