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
since you can explicitly pass null as the value of a nullable field in GraphQL, instead of omitting it. And if you do so, it will correctly arrive on the server as null, instead of as undefined.
I'm wondering if it's possible to null the same as undefined. That is, for the following input type:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The docs give the following example to declare a nullable field:
However, this type definition should actually be:
since you can explicitly pass
null
as the value of a nullable field in GraphQL, instead of omitting it. And if you do so, it will correctly arrive on the server asnull
, instead of asundefined
.I'm wondering if it's possible to
null
the same asundefined
. That is, for the following input type:Sending both
{ "title": "Pie" }
and{ "title": "Pie", "averageRating": null }
will both result in{ "title": "Pie" }
on the server.If not, can I create a PR that implements this as a configuration?
Beta Was this translation helpful? Give feedback.
All reactions