Skip to content

How is the official support of null as input value in mutations? #3661

Answered by rmosolgo
pcMarcos asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Yes, in GraphQL, null means "the value here is null", not "there is no value here." Here's the spec which I've tried to implement:

https://spec.graphql.org/draft/#sec-Null-Value

For example, a mutation representing deleting a field...

From that example, it seems to me that GraphQL-Ruby matches the spec. By that reading, for"hobby" to remain unchanged, don't pass "hobby": ... at all. Does that sound right to you?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pcMarcos
Comment options

Answer selected by pcMarcos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants