graphql-engine/server/tests-py/queries/graphql_mutation/insert/nested
Antoine Leblanc a5589c185b Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484)
### Description

During the PDV refactor that led to 2.0, we broke an undocumented and untested semantic of inserts: accepting _explicit_ null values in nested object inserts.

In short: in the schema, we often distinguish between _explicit_ null values `{id: 3, author: null}` and _implicit_ null values that correspond to the field being omitted `{id: 3}`. In this particular case, we forgot to accept explicit null values. Since the field is optional (meaning we accept implicit null values), it was nullable in the schema, like it was in pre-PDV times. But in practice we would reject explicit nulls.

This PR fixes this, and adds a test. Furthermore, it does a bit of a cleanup of the Mutation part of the schema, and more specifically of all insertion code.

https://github.com/hasura/graphql-engine-mono/pull/2341

GitOrigin-RevId: 895cfeecef7e8e49903a3fb37987707150446eb0
2021-09-15 13:11:48 +00:00
..
articles_author_upsert_fail.yaml introduce v1/graphql (fix #1368) (#2064) 2019-05-10 11:35:10 +05:30
articles_with_author_author_id_fail.yaml minor typo fixes (#165) 2021-03-04 06:36:15 +00:00
articles_with_author_null.yaml Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484) 2021-09-15 13:11:48 +00:00
articles_with_author_returning.yaml fix few bugs related to nested insert returning (fix #3609, #3642, #3271) (#3618) 2020-02-04 21:04:17 +05:30
articles_with_author.yaml Fix result ordering in some incorrect tests 2019-11-05 15:15:25 -06:00
author_one.yaml allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
author_upsert_articles_fail.yaml introduce v1/graphql (fix #1368) (#2064) 2019-05-10 11:35:10 +05:30
author_upsert_one_no_update.yaml allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
author_upsert_one_update.yaml allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
author_with_articles_author_id_fail.yaml introduce v1/graphql (fix #1368) (#2064) 2019-05-10 11:35:10 +05:30
author_with_articles_empty.yaml fix few bugs related to nested insert returning (fix #3609, #3642, #3271) (#3618) 2020-02-04 21:04:17 +05:30
author_with_articles_null.yaml introduce v1/graphql (fix #1368) (#2064) 2019-05-10 11:35:10 +05:30
author_with_articles_one.yaml allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
author_with_articles.yaml fix few bugs related to nested insert returning (fix #3609, #3642, #3271) (#3618) 2020-02-04 21:04:17 +05:30
author_with_detail_fk.yaml better handling for one-to-one relationships 2021-03-03 13:02:59 +00:00
author_with_detail.yaml better handling for one-to-one relationships 2021-03-03 13:02:59 +00:00
schema_setup.yaml better handling for one-to-one relationships 2021-03-03 13:02:59 +00:00
schema_teardown.yaml Integration test improvements (for speed/clarity), also increase polling interval for scheduled events 2021-04-27 05:35:26 +00:00
values_setup.yaml run graphql tests on both http and websocket; add parallelism (close #1868) (#1921) 2019-04-08 12:52:38 +05:30
values_teardown.yaml better handling for one-to-one relationships 2021-03-03 13:02:59 +00:00