neo4j-graphql-js icon indicating copy to clipboard operation
neo4j-graphql-js copied to clipboard

Nested Mutations

Open YizYah opened this issue 7 years ago • 3 comments

I'm proposing and requesting that you implement nested mutations as shown in the neo4j-graphql-server package.

Now that a few key features have been added to neo4j-graphql-js (specifically: [1] support for middlewared generated errors, [2] overwriting and extending of generated mutations; [3] autogeneration of ids) the package can support production servers. But the front end code is complex and laborious, because a Create call must frequently be followed up by a separate Create call to create some other needed type, followed in turn by an Add call connecting the new instances. With a few layers of nesting, this becomes a large burden on the coders.

As my main React coder observed on Wednesday: "There are so many Mutations right now. Maintainability suffers. One of the things I believe GraphQL was trying to solve is currently happening to us. Lol." [He means the need for the multiple calls.]

YizYah avatar Aug 19 '18 08:08 YizYah

Not sure if it's helpful for building out the case for Neo4j to implement, but Graphcool/Prism.io seem to have implemented this in a fairly sophisticated manner.

GraphCool docs

Prisma.io docs

btroop avatar Feb 08 '19 23:02 btroop

+1 I love your neo4j-graphql-js library. The main problem we face to use it is with nested mutation (which doesn't exist yet). I saw that you plan to introduce it. Do you have any idea when it'll be available ?

@btroop GraphCool and Prisma doesn't work with neo4j

jonasdumas avatar Sep 22 '19 22:09 jonasdumas

https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608

michaeldgraham avatar May 02 '21 04:05 michaeldgraham