graphql-engine/server/src-lib/Hasura/GraphQL/Schema
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
..
Action.hs server/mssql: integrate insert mutation schema parser for MSSQL backend 2021-08-31 13:35:49 +00:00
Backend.hs server/mssql: integrate insert mutation schema parser for MSSQL backend 2021-08-31 13:35:49 +00:00
BoolExp.hs server/postgres: Support computed fields in permission check/filter 2021-07-28 08:10:25 +00:00
Build.hs server: add IR support for DB-to-DB joins 2021-07-26 13:05:53 +00:00
Common.hs server/bigquery: implement _in and _nin operators. (close #7343) 2021-08-06 19:58:33 +00:00
Instances.hs mysql: Metadata awareness 2021-07-15 12:45:51 +00:00
Introspect.hs server: fix order of fields in introspection output 2021-05-19 16:38:54 +00:00
Mutation.hs Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484) 2021-09-15 13:11:48 +00:00
OrderBy.hs server/postgres: support computed fields in order by 2021-07-27 16:28:23 +00:00
Postgres.hs server: add IR support for DB-to-DB joins 2021-07-26 13:05:53 +00:00
Remote.hs Remote Schema Customization take 2 using parser tranformations 2021-07-30 11:33:59 +00:00
Select.hs server: fix the nullability of object relationships (fix hasura/graphql-engine#7201) 2021-08-26 15:27:34 +00:00
Table.hs server: add metadata for DB-DB remote joins 2021-07-22 23:07:10 +00:00