graphql-engine/v3/crates/lang-graphql
Tom Harding fa5673cd1f Allow non-nullable variables to fulfil nullable values (#795)
### What

This PR fixes a bug with variable nullability coercion. Specifically,
providing a non-null variable for a nullable field should work, as all
non-nullable variables can be used as nullable variables via "coercion".

Related issues:
* https://hasurahq.atlassian.net/browse/V3ENGINE-243
* https://github.com/hasura/v3-e2e-testing/pull/224 (the test for this
change)

### How

I think someone did something clever with macros, so I tried to unpack
the macro to make sense of it, and in the process, spotted the bug: it's
not that both the location must be nullable AND the variable not, it's
that _if_ the variable is nullable, the location must not be nullable.

V3_GIT_ORIGIN_REV_ID: 4f4ba3fe6898220bbba9ae2867233cd762bef1cb
2024-07-04 16:07:35 +00:00
..
benches Ban println! in code with clippy (#711) 2024-06-24 11:46:53 +00:00
src Allow non-nullable variables to fulfil nullable values (#795) 2024-07-04 16:07:35 +00:00
tests Ban println! in code with clippy (#711) 2024-06-24 11:46:53 +00:00
Cargo.toml Replace lazy_static with stdlib equivalents. (#758) 2024-06-26 12:45:41 +00:00