graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

[RFC] nested updates

Open rikinsk opened this issue 4 years ago • 28 comments

Description

Propose RFC for nested updates. View RFC

Affected components

  • [x] Other (list it)
    • RFCs

Related Issues

  • https://github.com/hasura/graphql-engine/issues/669
  • https://github.com/hasura/graphql-engine/issues/1573
  • https://github.com/hasura/graphql-engine/issues/3366
  • https://github.com/hasura/graphql-engine/issues/2952

rikinsk avatar Feb 07 '20 12:02 rikinsk

Excited to see this being worked on! Can you expand on how would link and unlink work?

dariocravero avatar Feb 12 '20 17:02 dariocravero

@dariocravero I have updated the RFC with some more details. Let me know if you think there should be some more information.

rikinsk avatar Feb 13 '20 08:02 rikinsk

@rikinsk is this PR also covering m:n related nested updates?

dohomi avatar Feb 14 '20 00:02 dohomi

Gotcha! Thanks @rikinsk!

dariocravero avatar Feb 16 '20 22:02 dariocravero

https://github.com/hasura/graphql-engine/issues/669 was the first related issue, may want to add it to the description :)

patcito avatar Feb 17 '20 14:02 patcito

Deploy preview for hasura-docs ready!

Built with commit f1c3c90368583022b0eb519f6131f08db2714f66

https://deploy-preview-3852--hasura-docs.netlify.com

netlify[bot] avatar Feb 18 '20 12:02 netlify[bot]

@rikinsk looking at the RFC, looks like you have only one _relationships per mutation, is that correct? So you can’t update multiple authors with different addresses?

Current proposed API would cover most of the use cases though. Would love to see any progress in this area.

almassapargali avatar Mar 01 '20 07:03 almassapargali

@almassapargali That is true. All the authors that would be updated are selected via the where clause and the "update" performed on all of them will be the same ie. same address update

rikinsk avatar Mar 02 '20 06:03 rikinsk

Excited to see that this functionality is in the works. Looking forward to experiment with it :)

weyert avatar Apr 11 '20 01:04 weyert

Is this still in the works?

csadai avatar Jun 21 '20 01:06 csadai

Looking forward to this feature! ✌️

marcfalk avatar Jul 25 '20 16:07 marcfalk

We really need this feature !!

ghyath5 avatar Jul 25 '20 16:07 ghyath5

Dear all, what is the status on this feature? When can we expect it to be live?

semyou avatar Jul 29 '20 05:07 semyou

Bumping this issue again :) This would be an awesome feature!

smblee avatar Sep 26 '20 05:09 smblee

I've been checking this issue every other day hoping to see some movement. Will this land any time soon?

alradadi avatar Dec 16 '20 20:12 alradadi

The RFC, if I am reading it correctly, treats an upsert as an insert, and does nothing extra.

I have a situation in which I am doing an upsert, and have a nested array relationship. When my upsert is updating an existing row, I would like to replace any existing nested relationships with the new relationships I am specifying in the upsert.

Can this scenario be included?

rocketraman avatar Feb 02 '21 23:02 rocketraman

Another bump. Is there any update about this?

gsaidy avatar Feb 21 '21 19:02 gsaidy

Any chance this gets merged before 2.0 exits the alpha stage?

BenoitRanque avatar May 17 '21 14:05 BenoitRanque

Any chance this gets merged before 2.0 exits the alpha stage?

@BenoitRanque I don't think this has even gone to development yet since the RFC is still open

valstu avatar May 26 '21 18:05 valstu

I've been doing tests in the last few hours and have seen that one-to-one relationship inserts with the foreign key on the "child" table are now working on cloud. I can't find any other info about this pushed to production besides this: https://github.com/hasura/graphql-engine/issues/6918

seanonthenet avatar Jun 18 '21 16:06 seanonthenet

I've been doing tests in the last few hours and have seen that one-to-one relationship inserts with the foreign key on the "child" table are now working on cloud. I can't find any other info about this pushed to production besides this: #6918

Insert works fine. What they are talking here is for updates, which isn't possible yet.

edmbn avatar Jul 06 '21 16:07 edmbn

Could someone enlighten of how this RFC pertains to pre-filled columns from session variables, that need joining with a relation? E.g. insert user setting, given session variable auth0 user id, should prefill user_id in settings, to the session id -> users.{idp_id => id }.

haf avatar Aug 13 '21 13:08 haf

Anyone looking at this?

jdgamble555 avatar Jan 05 '22 06:01 jdgamble555

commenting just to keep this RFC alive. Much valued feature imo

aatauil avatar Feb 24 '22 20:02 aatauil

Another bump because I'd love to see this feature!

dnishiyama avatar Apr 22 '22 00:04 dnishiyama

Any updates on this one? Been a couple of years and highly desired feature. Thanks to the team for a splendid Hasura!

rille111 avatar Jun 19 '22 14:06 rille111

Bumping this up! would love to use this feature instead of a workaround.

rohitnick avatar Aug 24 '22 11:08 rohitnick

Looking forward to this feature! thanks to Hasura team

octadimarco avatar Oct 13 '22 15:10 octadimarco