graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Fix support for null literals

Open mpenick opened this issue 5 years ago • 8 comments

This builds on an existing PR: https://github.com/graphql-go/graphql/pull/401. It fixes issues found in that PR (it works for enums, objects, and lists values) and adds tests.

Externally, this uses nil instead of a special value/type i.e. NullValue. Internally, it differentiates between "not present" and "null" using a special nullValue type.

Give it a try and let me know what you think.

mpenick avatar Apr 08 '20 18:04 mpenick

Coverage Status

Coverage increased (+0.02%) to 92.395% when pulling 50ac617737d69a9dd65f7ff5e7121859e3548d8f on mpenick:master into 02caa8943d64d9cd60bd67f2bc163676716bb963 on graphql-go:master.

coveralls avatar Apr 08 '20 18:04 coveralls

This also fixes issues with incorrect element indexes being used in errors.

mpenick avatar Apr 08 '20 18:04 mpenick

We've been using this fix for the past week and works perfectly. The fix is straightforward and provides good coverage.

Is there anything I can do to help land this?

jorgebay avatar Apr 17 '20 09:04 jorgebay

Is this project still active? I've seen some pull requests with no answers, and that worries me.

jeduardocosta avatar May 15 '20 02:05 jeduardocosta

Is this project still active? I've seen some pull requests with no answers, and that worries me.

It is but @chris-ramon is the only one approving/merging PRs. He seems to approve the straightforward ones every few months or so.

bhoriuchi avatar May 18 '20 13:05 bhoriuchi

@chris-cp @ddebrunner Can we merge this PR? As per GraphQL specs we allow "Null" in the list

vyj7 avatar Apr 21 '22 21:04 vyj7

We also have a scenario with this issue, can we please fix it 🙏🙏

krasish avatar Oct 31 '23 11:10 krasish