graphql-engine
graphql-engine copied to clipboard
mutations should use the same key for data in outer and inner tables
Currently, we use objects for outer table and data for inner table:
mutation insert_article {
insert_article(
objects: [
{
id: 21,
title: "Article 1",
content: "Sample article content",
author: {
data: {
id: 11,
name: "Cory"
}
}
}
]
) {
affected_rows
returning {
id
title
author {
id
name
}
}
}
}
Possible options:
- Use
objectsin both - Use
datain both - Use
objectsorobjectbased on relationship type
I vote for no. 3. Objects or object in upsert makes more sense.
Also, will this be a breaking change? @0x777
This issue will now be reviewed and tracked as part of the Hasura V3 roadmap.