graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.89k stars 840 forks source link

Support for null values #683

Open krasish opened 10 months ago

krasish commented 10 months ago

Description:

Currently, null values are explicitly ignored and cause an error when parsing. This is not correct, because the GraphQL spec supports them. (ref).

There are also quite a few open issues which refer to this problem, namely:

This PR provides support for null values. I tried to keep the implementation maximally "compliant" with the current codebase, but I am willing to make changes, just to merge this functionality.

I assume that this project is already being used in quite a few production cases and such deviations from the spec are not acceptable. I see that there already are some PRs that introduce this change, which are outdated, I will try to keep mine up-to-date, just to get this merged.

coveralls commented 10 months ago

Coverage Status

coverage: 91.688% (-0.4%) from 92.051% when pulling c0f6a48a493cdc1e37aa07fb287e35a9af0a0d7f on krasish:support-nulls into 4ebf270b92df8ca6b2eb2ed97e595e642dee9b0a on graphql-go:master.

krasish commented 10 months ago

@sogko @chris-ramon please take a look at this 🙏

jorgerasillo commented 6 months ago

@sogko or @chris-ramon any chance y'all can get a review on this?