-
Notifications
You must be signed in to change notification settings - Fork 96
Add support for partial updates #310
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 partial updates #310
Conversation
Thank you for the PR @anttip, After an initial look, this seems like a good idea, things are a bit busy on our end but we'll try to review that PR at some point in May (or earlier if we can). |
Sorry for the delay, we'll try to review it by the end of June. |
Thanks for the update! Looking forward to the review. Meanwhile I can report that we have been using it without issues from our fork since creation. Hope it makes it to the project and is useful for others as well. |
@Fgerthoffert Any updates on this? |
Apologies for the repeated delays, the past few months have been quite busy on our end. If everything goes as expected, we should review it within the next 2–3 weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution, globally everything is good, please fix the few suggestions, we'll be able to merge afterwards
src/main/java/graphql/annotations/dataFetchers/MethodDataFetcher.java
Outdated
Show resolved
Hide resolved
src/main/java/graphql/annotations/dataFetchers/MethodDataFetcher.java
Outdated
Show resolved
Hide resolved
Co-authored-by: David Griffon <dgriffon@jahia.com>
Co-authored-by: David Griffon <dgriffon@jahia.com>
Thank you for the review and suggestions @dgriffon! |
Thank you so much for your contribution! 🚀 |
Adds support for binding to
java.util.Optional
parameters. Binding to Optional parameters allows implementing partial updates. With a partial update the mutate call can update only some of the Optional fields without needing to repeat all the existing values of an object.The mapping from an optional field in GraphQL schema that binds to
java.util.Optional
is the following:java.util.Optional
of the underlying typeOptional.empty
to signal the removal of a possibly existing value of the fieldundefined
so any possibly existing value(s) should not be modified