jlouis / graphql-erlang

GraphQL implementation in Erlang.
Other
313 stars 52 forks source link

Jun2018 Spec: Null value support (2.9.5) #180

Open jlouis opened 6 years ago

jlouis commented 6 years ago

You can now input null values in the GraphQL specification. Interestingly, this is also part of the Oct2016 specificaton, but I don't recall seeing it there ever. In any case, we now need to make distinction between:

Which have semantic difference. Which in turn open up a can of worms on the server-side since there is more than one way to say "I have no value for this field". The upshot is that it can be used to mix UPDATE-like statements (RESTful PUTs) in an easier way since you can be explicit about the fields which were overridden. It also means non-null becomes far more important in the specifications going forward.

The addition luckily has no semantic change to existing parts of the system, but the tutorial documentation might have to change around this area as well, since it is updated.

We are currently not handling this at all, and it affects #171 and also #166, so it might be beneficial to implement this before tackling those two.

jlouis commented 6 years ago

This is from the 26th of October 2016, so it was added just when the Oct2016 spec was written. I'm pretty sure it has never been there in the spec I used.

o.O

In any case, this is a fun addition to the language.

jlouis commented 6 years ago

More digging: This was not part of the April 2016 spec, so it is likely it entered in the very end of the Oct2016 cycle, and thus it isn't documented for Jun2018.