You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support checks if GraphQL argument was set to null or omitted entirelyΒ #518
By default input arguments in GraphQL are nullable and optional, see Nullable vs Optional, which means an argument can be set to null, or not provided at all. The distinction enables partial updates in mutations where the underlying data storage can also be either set to null or not changed at all.
As described in #140 and #228, when binding an argument via @Argument, there is no way to make such a distinction. You can get a null or an empty Optional for the resulting value, but no way to check if the argument was omitted or not.
We can provide ArgumentValue as a simple container for the underlying value along with a flag for whether it was omitted or not. This could be used as an alternative to @Argument on controller method parameters, or nested within the structure of an @Argument object.
changed the title [-]Support checking if a GraphQL argument was omitted [/-][+]Support checks if GraphQL argument was set to `null` or omitted entirely[/+]on Nov 9, 2022
Activity
[-]Support checking if an argument was omitted [/-][+]Support checking if a GraphQL argument was omitted [/+]jord1e commentedon Oct 24, 2022
@rstoyanchev typo at
d9f815e#diff-99d081232dfcf90f7ad4241a7e5ad145df4f8166f2bf13d5ab2b0e0775130cbbR1409
should be
rstoyanchev commentedon Oct 24, 2022
Updated in be9a215.
[-]Support checking if a GraphQL argument was omitted [/-][+]Support checks if GraphQL argument was set to `null` or omitted entirely[/+]Add support for checking if an argument was omitted
Add support for checking if an argument was omitted
Add support for checking if an argument was omitted