Skip to content

Commit 261d37c

Browse files
committed
removed connectOrCreate
1 parent 18edfb3 commit 261d37c

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

modules/ROOT/pages/mutations/update.adoc

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -103,54 +103,6 @@ mutation {
103103
}
104104
----
105105

106-
== `connectOrCreate` relationships
107-
108-
Consider the example provided in the xref:mutations/create.adoc#_connectorcreate_relationships[`create`] page:
109-
110-
[source, graphql, indent=0]
111-
----
112-
mutation {
113-
createActors(input: {
114-
name: "Tom Hanks",
115-
movies: {
116-
connectOrCreate: {
117-
where: { node: { id_EQ: "1234" } }
118-
onCreate: { node: { title: "Forrest Gump" } }
119-
}
120-
}
121-
}) {
122-
info {
123-
nodesCreated
124-
}
125-
}
126-
}
127-
----
128-
129-
`connectOrCreate` is also available in `update` operations:
130-
131-
[source, graphql, indent=0]
132-
----
133-
mutation {
134-
updateActors(
135-
update: {
136-
movies: {
137-
connectOrCreate: {
138-
where: { node: { id_EQ: "1234" } }
139-
onCreate: { node: { title: "Forrest Gump" } }
140-
}
141-
}
142-
},
143-
where: { name_EQ: "Tom Hanks" }
144-
) {
145-
info {
146-
nodesCreated
147-
}
148-
}
149-
}
150-
----
151-
152-
This operation is equivalent to the previous example.
153-
154106
== Array methods
155107

156108
Array methods allow the modification of existing property arrays in `update` mutations within these entities:

0 commit comments

Comments
 (0)