-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add support for public fields instead of getters #1026
Comments
Are these also panache entities ? If so, there was a bug w.r.t that, that is now fixed (quarkusio/quarkus#19883). If not, then this is an issue, as we do support public fields. |
yes, indeed it is panache entity. so I guess it's good to be closed as 2.3 of quarkus will come with the fix. thanks @phillip-kruger |
Great ! Closing here then |
For your interest: When a panache bean builds, all fields are changed to protected, and getters/setters are added. So the issue was that GraphQL build a model, that wants to execute using the field, but then on runtime the fields are not accessible. So the fix was to update the Jandex index with the modified panache entities, before building the GraphQL mode. |
When using beans that are returned from GraphQL services that use only public fields instead of java bean approach (getters/setters) then there is a DataFetchException returned for every path that targets beans without getters and setters.
Would be really good to have support for beans with public fields as this becomes more and more common.
Unless I missed some sort of configuration that enables that.
Using smallrye-graphql version 1.3.1 through quarkus 2.2.1
The text was updated successfully, but these errors were encountered: