You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/directives/schema-configuration/field-configuration.adoc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ directive @relationship(
96
96
97
97
*Configure aggregation*
98
98
99
-
From the previous type definitions, the type related to `Actor` produced are:
99
+
From the previous type definitions, the types related to `Actor` produced are:
100
100
101
101
[source, graphql, indent=0]
102
102
----
@@ -307,9 +307,9 @@ type ActorActedInConnection {
307
307
}
308
308
----
309
309
310
-
Note how the `actedInConnection` field is generated but `aggregate` is still present on the `ActorActedInConnection` type, and not affected by the argument `onAggregate`.
310
+
Note how the `aggregate` field is still present on the `ActorActedInConnection` type, and not affected by the argument `onAggregate`.
311
311
312
-
To disable the generation of the `aggregate` field on , see the `aggregate` argument of the directive xref::/schema-configuration/field-configuration.adoc#_relationship[`@relationship`].
312
+
To disable the generation of the `aggregate` field, see the `aggregate` argument of the xref::/schema-configuration/field-configuration.adoc#_relationship[`@relationship` directive].
Copy file name to clipboardExpand all lines: modules/ROOT/pages/types/relationships.adoc
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -52,15 +52,16 @@ type Movie @node {
52
52
Note that, in this query:
53
53
54
54
* A `Person` can _act in_ or _direct_ multiple movies, and a `Movie` can have multiple actors.
55
-
While it is rare for a `Movie` to have more than one director, Neo4j GraphQL Library requires all relationships to be modeled as "many" relationships (using Lists).
56
-
* Even conceptually one-to-one relationships like a movie having a single director must be represented as arrays (e.g., `directors: [Person!]!`) because Neo4j cannot reliably enforce 1:1 cardinality between nodes.
55
+
While it is rare for a `Movie` to have more than one director, the Neo4j GraphQL Library requires all relationships to be modeled as "many" relationships (using lists).
56
+
* Even conceptually one-to-one relationships, such as a movie having a single director, must be represented as arrays (e.g., `directors: [Person!]!`) because Neo4j cannot reliably enforce one-to-one cardinality between nodes.
57
57
* To figure out whether the `direction` argument of the `@relationship` directive should be `IN` or `OUT`, visualize your relationships like in the diagram above, then model out the direction of the arrows.
58
58
* The `@relationship` directive is a reference to Neo4j relationships, whereas in the schema, the phrase `edge(s)` is used to be consistent with the general API language used by Relay.
59
59
60
-
=== Neo4j GraphQL Cardinality Limitation
60
+
=== Neo4j GraphQL cardinality limitation
61
61
62
-
It's important to understand that Neo4j cannot reliably enforce 1:1 cardinality between nodes in a graph database. Therefore, all relationships in Neo4j GraphQL are modeled as "many" relationships (using Lists) even when conceptually they represent one-to-one relationships.
63
-
As alternative you can define your relationship with the `@cypher` directive, however some of the functionality provided by the Neo4j GraphQL Library will not be available.
62
+
It's important to understand that Neo4j cannot reliably enforce one-to-one cardinality between nodes in a graph database.
63
+
Therefore, all relationships in Neo4j GraphQL are modeled as "many" relationships (using lists) even if they represent one-to-one relationships conceptually.
64
+
As an alternative you can define your relationship with the `@cypher` directive, however some of the functionality provided by the Neo4j GraphQL Library will not be available.
0 commit comments