How can I distinguish in java graphQL if a parameter was explicitly set to null, or if it was not provided at all?
The use case that I try to achieve is the following: I have a mutation like this
updateUser(id:Int!, changes:UserChanges!)
#where UserChanges is defined as:
type UserChanges {
login:String
email:String
#etc
}
The idea here is that the user provides only the fields that he wants to change (like react setState for example). So if email is ommited, I want to leave it unchanged.
But what if he/she wants to explicitly set email to null? Is there any way figure this out from my resolver method and act accordingly?
(I use graphql-java-tools library)