Hi Team,
I have an issue with default values coming from JSON input. when I am passing Id=1234 and content=maths the other fields author and isNetCalculated by default coming null to java object. this is updating null to author and isNetCalculated for Id=1234. where as user saying he does not want to update author and isNetCalculated and wants to only update content=maths for Id=1234. In this case by using java null check I can avoid updating author and isNetCalculated. but in some cases user saying when he passes author= null he wants to update the author column with null value. how to handle this scenario? I am using spring boot graphql api. How to find what columns actually user passing in the input json?
Schema.graphqls
input MessageInput {
Id: String!
content: String
author: String
isNetCalculated: Boolean
}
type Mutation {
createMessage(input: MessageInput): Message
}
Sample JSON Request:
mutation{
createMessage(input: {
Id: “1234”,
content: “maths”})
}