-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for relationships in update mutations #669
Comments
I've described how Prisma handles this in #1573 (comment) |
We can learn how Prisma handles this problem (described by @nolandg), they do very well, I think. |
So, is this still on track ? This feature is clearly lacking |
@coco98 Is there a timeline for this? I'm currently working on a problem created by the lack of this feature. |
3 years after this issue is still open, it is a shame that such a feature is still not implemented. Can we ask a Hasura boss for this ? Please everyone, contact Hasura directly as i have done myself to ask for this. The Hasura core team have to know we are waiting for this, they have to put someone one this now ! |
@marionschleifer is there an update on this? |
@marionschleifer it seems this issue is the same as #1573 |
Thanks for this feature request! Closing this issue to deduplicate things, in favour of #1573 |
## Description There is a bug in NDC validation of command where it returns early without validating. This is because we perform the NDC validation right after resolving the command source, but haven't attached the "resolved command source" to the command yet. As a result the command's source is `None`, and the validation does an early return. This PR fixes it by taking the command source directly. If there is no source to resolve, we don't have to perform any NDC validation of the command. Note: this is not the case with models. Model's source resolving attaches the "resolved source", then performs the validation. ## Changelog - Add a changelog entry (in the "Changelog entry" section below) if the changes in this PR have any user-facing impact. See [changelog guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide). - If no changelog is required ignore/remove this section and add a `no-changelog-required` label to the PR. ### Product _(Select all products this will be available in)_ - [x] community-edition - [x] cloud <!-- product : end : DO NOT REMOVE --> ### Type <!-- See changelog structure: https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog --> _(Select only one. In case of multiple, choose the most appropriate)_ - [ ] highlight - [ ] enhancement - [x] bugfix - [ ] behaviour-change - [ ] performance-enhancement - [ ] security-fix <!-- type : end : DO NOT REMOVE --> ### Changelog entry <!-- - Add a user understandable changelog entry - Include all details needed to understand the change. Try including links to docs or issues if relevant - For Highlights start with a H4 heading (#### <entry title>) - Get the changelog entry reviewed by your team --> Fix skipping of NDC validation of commands due to wrong assumption. <!-- changelog-entry : end : DO NOT REMOVE --> <!-- changelog : end : DO NOT REMOVE --> V3_GIT_ORIGIN_REV_ID: 5b9f4c922ee83394f1b6fe840cd934b6e138e2e9
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".
The text was updated successfully, but these errors were encountered: