Hi, say we have a table A
id: number, primary key, unique, default: nextval
related_id: integer, nullable
and table B
id: number, primary key, unique, default: nextval
related_text: string
w/ foreign keys
and add a relationship called relationship
Now since related_id is nullable, we should be able to insert
mutation MyMutation {
insert_A(objects: {relationship: null}) {
returning {
relationship {
id
related_text
}
}
}
}
I am getting the following error
"expected an object for type \"B_obj_rel_insert_input\", but found null"
This error does not happen on Hasura 1.3.3.
I wonder if it's related nested inserts (https://hasura.io/docs/latest/graphql/core/databases/postgres/mutations/insert.html#nested-inserts). I also didn't find anything in the release notes for Hasura 2.0.
Thanks