Skip to content

Commit 00552ce

Browse files
MacondoExpressdarrellwardersill-neo4j
authored
Apply suggestions from code review
Co-authored-by: Darrell Warde <8117355+darrellwarde@users.noreply.github.com> Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com>
1 parent 7bc95e2 commit 00552ce

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

modules/ROOT/pages/directives/schema-configuration/field-configuration.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ directive @relationship(
9696

9797
*Configure aggregation*
9898

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:
100100

101101
[source, graphql, indent=0]
102102
----
@@ -307,9 +307,9 @@ type ActorActedInConnection {
307307
}
308308
----
309309

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`.
311311

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].
313313

314314
== `@settable`
315315

modules/ROOT/pages/directives/schema-configuration/type-configuration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ directive @query(read: Boolean! = true, aggregate: Boolean! = false) on OBJECT |
5555

5656
=== Usage
5757

58-
.Disable Query _movies_ and _moviesConnection_ edges field
58+
.Disable query _movies_ and _moviesConnection_ edges field
5959
[source, graphql, indent=0]
6060
----
6161
type Movie @node @query(read: false, aggregate: true) {
@@ -139,7 +139,7 @@ type Movie @node @subscription(events: [CREATED]) {
139139
}
140140
----
141141

142-
.Enable subscriptions for all types but disable subscriptions for _Movie_
142+
.Enable subscriptions for all types except for _Movie_
143143
[source, graphql, indent=0]
144144
----
145145
type Movie @node @subscription(events: []) {

modules/ROOT/pages/types/relationships.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ type Movie @node {
5252
Note that, in this query:
5353

5454
* 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.
5757
* 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.
5858
* 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.
5959

60-
=== Neo4j GraphQL Cardinality Limitation
60+
=== Neo4j GraphQL cardinality limitation
6161

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.
6465

6566
=== Relationship properties
6667

modules/ROOT/pages/types/spatial.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type Point {
4343
==== Queries and mutations
4444

4545
Due to the fact that `Point` is an object type, it has an additional type for input in queries and mutations.
46-
However, this input types the same shape as the object type:
46+
However, these input types have the same shape as the object type:
4747

4848
[source, graphql, indent=0]
4949
----

0 commit comments

Comments
 (0)