Skip to content

GraphQlArgumentInstantiator support for patchable arguments #228

Closed as not planned
@dchan4

Description

@dchan4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions