Skip to content

add support for relationships in update mutations #669

@patcito

Description

@patcito

Note from Hasura team: issue closed in favour of #1573

It would be nice to have support for relationships in update mutations like there is in insert so that it automatically delete/add new relationships.

My use case is if a Post table has tags ["x","y","z"] as a relationship in a tag_posts table, if I do an update mutation on post with just tags: ["x","y"] it would be nice if "z" could be deleted automatically from tag_posts table, if you see what I mean. Or maybe add an _unset operator so that we could do _set: {tags: ["x","y"]}, _unset: {tags: ["z"]} to delete "z". That would be more explicit and avoid having people deleting things without knowing. Maybe have an option to _unset all tags that are not set such as {_unsetAllNonSet: {tags: true}}, so in this case that would delete "z".

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions