Skip to content

Commit 3ad3aa8

Browse files
authored
docs: change the requirement of connectOrCreate to require @unique (#66) (#68)
* docs: change the requirement of connectOrCreate to require `@unique`
1 parent ebfcd14 commit 3ad3aa8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/ROOT/pages/mutations/create.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ Read about xref:mutations/update.adoc#_connectorcreate_relationships[`update`] f
111111

112112
== `connectOrCreate` relationships
113113

114-
If a related node has a `@unique` or `@id` directive defined, `connectOrCreate` can be used in a nested `create` to perform a `MERGE` operation on the related node.
115-
This should create a new relationship and the related node if it doesn't exist yet.
114+
If a related node has the `@unique` directive defined, `connectOrCreate` can be used in a nested `create` to perform a `MERGE` operation on the related node.
115+
This will create a new relationship and the related node if it doesn't exist yet.
116116

117117
Consider the following type definitions:
118118

@@ -125,7 +125,7 @@ type Actor {
125125
126126
type Movie {
127127
title: String
128-
id: ID! @id
128+
id: ID! @id @unique
129129
actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN)
130130
}
131131
----
@@ -163,4 +163,4 @@ The Neo4j GraphQL Library contains an optimization feature designed to mitigate
163163

164164
* A field is populated using the directive `@populated_by`.
165165
* The `connect` or `connectOrCreate` operation is used.
166-
* Interface and union types are present in the mutation.
166+
* Interface and union types are present in the mutation.

0 commit comments

Comments
 (0)