-
Notifications
You must be signed in to change notification settings - Fork 320
Support constructor binding for input arguments #138
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
Comments
This is indeed a limitation from the latest changes in input arguments support; as explained in 4dfb662, an object mapper based approach is not efficient and may override custom scalars. Using a |
Hm that's a pity.
You mean something like this? https://github.com/spring-projects/spring-framework/blob/958eb0f964ddef1ff1440fd10c5cb850f6ee96db/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelAttributeMethodArgumentResolver.java#L228-L260 |
Closing in favor of #139 |
Uh oh!
There was an error while loading. Please reload this page.
Using spring-graphql with Kotlin works, but when a field has a data class representing an input type, the class can't be instantiated, and fails on
BeanUtils.instantiateClass(ctor);
.This repo/commit demonstrates the issue by adding a Kotlin configuration to the project, and adding a test using a kotlin data class as mutation argument:
koenpunt@f85fd6e
A workaround is to not use data classes, but I do believe data classes should be supported as well.
The text was updated successfully, but these errors were encountered: