Closed as not planned
Description
Currently using the @Argument
annotation it is not possible to tell if a field was not provided, or provided with a null. For example given 2 inputs
{
"id": "1"
}
and
{
"id": "1",
"name": null
}
the org.springframework.graphql.data.method.annotation.support.GraphQlArgumentInstantiator#instantiate
method will instantiate the name
property to null
in both cases.
The use case for this is to implement patchable mutations e.g. if the name
field is not provided, do not update it.
Workaround is to not use @Argument
and implement custom deserialisation using the data fetching environment directly.