graphql-engine/server/src-lib/Hasura
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
..
Backends server: generalize event triggers - incremental PR 2 2021-09-09 11:55:11 +00:00
Base server: don't use Show to encode error codes 2021-09-06 15:49:56 +00:00
Cache server: remove remnants of query plan caching (fix #1795) 2021-07-27 11:52:43 +00:00
Eventing server: update create_scheduled_event API to respond with event_id 2021-09-13 18:01:55 +00:00
GraphQL Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484) 2021-09-15 13:11:48 +00:00
Incremental server: inherited roles for mutations, remote schemas, actions and custom functions 2021-08-09 10:21:05 +00:00
Metadata server: update create_scheduled_event API to respond with event_id 2021-09-13 18:01:55 +00:00
RQL Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484) 2021-09-15 13:11:48 +00:00
Server server: log operation details for each query in a batch query execution 2021-09-15 08:30:32 +00:00
SQL server: generalize event triggers - incremental PR 2 2021-09-09 11:55:11 +00:00
App.hs server: log operation details for each query in a batch query execution 2021-09-15 08:30:32 +00:00
EncJSON.hs Remote schema execution logic 2021-08-06 13:40:37 +00:00
GC.hs server: simplify shutdown logic, improve resource management (#218) (#195) 2020-12-21 18:56:57 +00:00
HTTP.hs [pro, server] Allow response when cache limits are hit 2021-08-25 01:53:45 +00:00
Incremental.hs Build the GraphQL context after pruning dangling dependents 2020-01-30 18:17:29 -06:00
Logging.hs server: generalize event triggers - incremental PR 2 2021-09-09 11:55:11 +00:00
Prelude.hs Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484) 2021-09-15 13:11:48 +00:00
QueryTags.hs server: SQL query tags for GQL operations (closes #400) 2021-07-29 08:30:10 +00:00
Session.hs kill Arbitrary (fix #1736) 2021-07-30 07:55:37 +00:00
Tracing.hs Remote Schema Customization take 2 using parser tranformations 2021-07-30 11:33:59 +00:00