postgraphile-plugin-nested-mutations icon indicating copy to clipboard operation
postgraphile-plugin-nested-mutations copied to clipboard

Supporting nested upsert mutations

Open jptissot opened this issue 6 years ago • 4 comments

I have a central entity that has many tags (via a many-many relationship). I would like to be able to easily update the list of tags in a single query. Nested upsert mutations would fix this. I currently have to manually write plpgsql functions to do so.

jptissot avatar Feb 05 '19 19:02 jptissot

Upserts are definitely on the todo list ... I think this would also solve the root of the issue in #15.

mlipscombe avatar Mar 26 '19 05:03 mlipscombe

Maybe some code from https://github.com/einarjegorov/graphile-upsert-plugin can be reused?

https://github.com/einarjegorov/graphile-upsert-plugin/blob/94ea92e71e25a3c981feaa40cebcd0aad781f1af/index.js#L189-L199

saerdnaer avatar Aug 25 '19 10:08 saerdnaer

my graphile-upsert-plugin fork is slightly more up-to-date, and includes a batch upsert plugin: https://github.com/micimize/graphile-upsert-plugin

micimize avatar Jan 19 '20 17:01 micimize

Hi @mlipscombe any chance the PR for 15/16 will close this one out too?

mitswan avatar Jan 28 '20 04:01 mitswan