From 261d37c6da5a0f4a34ca51de4f7a8ff0dd770a29 Mon Sep 17 00:00:00 2001 From: Richard Sill Date: Wed, 9 Apr 2025 18:06:26 +0200 Subject: [PATCH] removed connectOrCreate --- modules/ROOT/pages/mutations/update.adoc | 48 ------------------------ 1 file changed, 48 deletions(-) diff --git a/modules/ROOT/pages/mutations/update.adoc b/modules/ROOT/pages/mutations/update.adoc index 4dd4b7c8..36189556 100644 --- a/modules/ROOT/pages/mutations/update.adoc +++ b/modules/ROOT/pages/mutations/update.adoc @@ -103,54 +103,6 @@ mutation { } ---- -== `connectOrCreate` relationships - -Consider the example provided in the xref:mutations/create.adoc#_connectorcreate_relationships[`create`] page: - -[source, graphql, indent=0] ----- -mutation { - createActors(input: { - name: "Tom Hanks", - movies: { - connectOrCreate: { - where: { node: { id_EQ: "1234" } } - onCreate: { node: { title: "Forrest Gump" } } - } - } - }) { - info { - nodesCreated - } - } -} ----- - -`connectOrCreate` is also available in `update` operations: - -[source, graphql, indent=0] ----- -mutation { - updateActors( - update: { - movies: { - connectOrCreate: { - where: { node: { id_EQ: "1234" } } - onCreate: { node: { title: "Forrest Gump" } } - } - } - }, - where: { name_EQ: "Tom Hanks" } - ) { - info { - nodesCreated - } - } -} ----- - -This operation is equivalent to the previous example. - == Array methods Array methods allow the modification of existing property arrays in `update` mutations within these entities: