graphql-engine/v3/crates
paritosh-08 640457b09a allow null for nullable field (#490)
<!-- Thank you for submitting this PR! :) -->

## Description

This PR fixes the bug where passing a null value to a nullable input
field resulted in an error. It also uncomments the test for that.

JIRA: https://hasurahq.atlassian.net/browse/V3ENGINE-97

According to [the graphql
spec](https://spec.graphql.org/October2021/#sec-Null-Value):

>
>
> ```graphql
> {
>   field(arg: null)
>   field
> }
> ```
> The first has explicitly provided null to the argument “arg”, while
the second has implicitly not provided a value to the argument “arg”.
These two forms may be interpreted differently.

We are also considering the two cases separately, i.e., if something is
absent and nullable vs if something is set to null and is nullable. We
are not manually adding the nullable fields and setting them to null if
not specified explicitly.

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.

### Product
_(Select all products this will be available in)_
- [x] community-edition
- [x] cloud
<!-- product : end : DO NOT REMOVE -->

### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [x] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry
<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

allow null for nullable field

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

---------

Co-authored-by: Anon Ray <ecthiender@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 4aa181899379905aaca1a71f498b85515180ae1d
2024-04-23 08:07:28 +00:00
..
custom-connector Bundle custom connector data with the binary. (#480) 2024-04-19 15:06:11 +00:00
engine allow null for nullable field (#490) 2024-04-23 08:07:28 +00:00
hasura-authn-core use clippy settings in Cargo workspace (#441) 2024-04-08 10:14:11 +00:00
hasura-authn-jwt Set trace headers when making HTTP requests during JWT auth. (#477) 2024-04-18 18:12:53 +00:00
hasura-authn-webhook Use anyhow in tests instead of unwrapping everywhere. (#475) 2024-04-18 08:58:17 +00:00
lang-graphql allow null for nullable field (#490) 2024-04-23 08:07:28 +00:00
metadata-schema-generator Add a binary for generating the OpenAPI schema for the metadata type. (#453) 2024-04-10 07:36:55 +00:00
open-dds Require that subgraph names be valid identifiers (#492) 2024-04-22 15:52:02 +00:00
opendds-derive Use references where possible instead of cloning. (#478) 2024-04-18 17:35:48 +00:00
recursion_limit_macro use clippy settings in Cargo workspace (#441) 2024-04-08 10:14:11 +00:00
tracing-util Use references where possible instead of cloning. (#478) 2024-04-18 17:35:48 +00:00