Skip to content

Commit 3c80358

Browse files
committed
review suggestions
1 parent 8f35419 commit 3c80358

File tree

2 files changed

+4
-43
lines changed

2 files changed

+4
-43
lines changed

modules/ROOT/pages/mutations/create.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Read about xref:mutations/update.adoc#_connectorcreate_relationships[`update`] f
112112

113113
== `connectOrCreate` relationships
114114

115-
If a related node has the `@unique` directive defined, you can use `connectOrCreate` nested in a `CREATE` mutation to perform an operation similar to a link:https://neo4j.com/docs/cypher-manual/current/clauses/merge/[Cypher `MERGE`] operation on the related node.
115+
If a related node has the `@unique` directive defined, you can use `connectOrCreate` nested in a `create` mutation to perform an operation similar to a link:https://neo4j.com/docs/cypher-manual/current/clauses/merge/[Cypher `MERGE`] operation on the related node.
116116
This will create a new relationship and the related node if it doesn't exist yet.
117117

118118
Consider the following type definitions:
@@ -157,9 +157,9 @@ This ensures that a movie with ID 1234 exists and is connected to `"Tom Hanks"`.
157157
If the movie does not exist, it will be created with the title `"Forrest Gump"`.
158158
If a movie with the given ID already exists, it will also be connected to `"Tom Hanks"`, and keep whatever title it has.
159159

160-
== `CREATE` optimization
160+
== `create` optimization
161161

162-
With `CREATE` operations, there is no limit on how many nodes can be created at once.
162+
With `create` operations, there is no limit on how many nodes can be created at once.
163163
However, there is a known performance issue for large batch sizes.
164164

165165
The Neo4j GraphQL Library contains an optimization feature designed to mitigate it, but it does not work in the following scenarios:

modules/ROOT/pages/mutations/delete.adoc

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -72,43 +72,4 @@ mutation {
7272
relationshipsDeleted
7373
}
7474
}
75-
----
76-
77-
This query is equivalent to:
78-
79-
[source, graphql, indent=0]
80-
----
81-
mutation {
82-
deleteUsers(
83-
where: {
84-
name: "Jane Doe"
85-
},
86-
delete: {
87-
posts: [
88-
where: {
89-
node: {
90-
creator: {
91-
name: "Jane Doe"
92-
}
93-
}
94-
}
95-
]
96-
}
97-
) {
98-
nodesDeleted
99-
relationshipsDeleted
100-
}
101-
}
102-
----
103-
104-
Note that the output Cypher statement should also have a redundant `WHERE` clause:
105-
106-
// !
107-
//Please add the cypher statement:
108-
109-
//[source, cypher, indent=0]
110-
//----
111-
//DELETE User (name:"Jane Doe")
112-
//WHERE Posts -
113-
//----
114-
// !
75+
----

0 commit comments

Comments
 (0)