Skip to content

Commit f90f617

Browse files
committed
review comments
1 parent 47927dd commit f90f617

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

modules/ROOT/pages/troubleshooting.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ DEBUG=@neo4j/introspector node src/index.js
6767
Read more about the xref::introspector.adoc[introspector].
6868

6969
[[troubleshooting-query-tuning]]
70-
== Query Tuning
70+
== Query tuning
7171

7272
Hopefully you won't need to perform any query tuning, but if you do, the Neo4j GraphQL Library allows you to set the full array of query options in the request context.
7373

modules/ROOT/pages/type-definitions/directives/custom-logic.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ type Query {
117117

118118
When returning an object type, all fields of the type must be available in the Cypher return value.
119119
This can be achieved by either returning the entire object from the Cypher query, or returning a map of the fields which are required for the object type.
120-
Both approaches are demonstrated below:
120+
Both approaches are demonstrated here:
121121

122122
[source, graphql, indent=0]
123123
----
@@ -263,7 +263,8 @@ type Mutation {
263263

264264
== `@coalesce`
265265

266-
When translating from GraphQL to Cypher, any instances of fields to which this directive is applied will be wrapped in a `coalesce()` function in the WHERE clause (see https://neo4j.com/developer/kb/understanding-non-existent-properties-and-null-values/#_use_coalesce_to_use_a_default_for_a_null_value).
266+
When translating from GraphQL to Cypher, any instances of fields to which this directive is applied will be wrapped in a `coalesce()` function in the WHERE clause.
267+
For more information, see link:https://neo4j.com/developer/kb/understanding-non-existent-properties-and-null-values/#_use_coalesce_to_use_a_default_for_a_null_value[Understanding non-existent properties and working with nulls].
267268

268269
This directive helps querying against non-existent properties in a database.
269270
However, it is encouraged to populate these properties with meaningful values if it becomes the norm.
@@ -323,6 +324,8 @@ The directive has two arguments:
323324
The query may still pass a higher or lower `limit`.
324325
* `max` - defines the maximum limit to be passed to the query.
325326
If a higher value is passed, it is used instead.
327+
328+
[NOTE]
326329
If no `default` value is set, `max` is used for queries without limit.
327330

328331
[source, graphql, indent=0]

modules/ROOT/pages/type-definitions/directives/database-mapping.adoc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,19 @@ Note that, in this case, there is a directive on each "end" of the relationship,
3333

3434
== `@relationshipProperties`
3535

36-
In order to add properties to a relationship, you need to add a new type to your type definitions decorated with the `@relationshipProperties` directive.
36+
=== Definition
37+
38+
[source, graphql, indent=0]
39+
----
40+
"""Required to differentiate between interfaces for relationship properties, and otherwise."""
41+
directive @relationshipProperties on OBJECT
42+
----
43+
44+
`@relationshipProperties` can only be used on interfaces.
45+
46+
=== Usage
47+
48+
In order to add properties to a relationship, add a new type to your type definitions decorated with the `@relationshipProperties` directive.
3749

3850
For example, for the "ACTED_IN" relationship, add a property "roles":
3951

@@ -54,7 +66,7 @@ type ActedIn @relationshipProperties {
5466
}
5567
----
5668

57-
Note that in addition to this type, there is an added a key `properties` in the existing `@relationship` directives.
69+
Note that in addition to this type, there is an added key `properties` in the existing `@relationship` directives.
5870
For more information, see xref::/type-definitions/types/relationships.adoc[Type definitions -> Relationships].
5971

6072

@@ -238,7 +250,8 @@ type UserLivesInProperties @relationshipProperties {
238250
}
239251
----
240252

241-
Note that the property in aliases are automatically escaped (wrapped with backticks ``), so there is no need to add escape characters around them.
253+
[NOTE]
254+
The property in aliases are automatically escaped (wrapped with backticks ``), so there is no need to add escape characters around them.
242255

243256

244257
== `@declareRelationship`

modules/ROOT/pages/type-definitions/directives/index.adoc

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,15 @@ The Neo4j GraphQL Library provides the following directives to be used whilst de
88

99
== Database mapping
1010

11-
.Database mapping directives
1211
[cols="2,5"]
1312
|===
1413
| Directive | Description
1514

1615
| xref::/type-definitions/directives/database-mapping.adoc#_relationship[`@relationship`]
17-
| Configure xref::/type-definitions/types/relationships.adoc[relationships] between object types.
16+
| Configures xref::/type-definitions/types/relationships.adoc[relationships] between object types.
1817

1918
| xref::/type-definitions/directives/database-mapping.adoc#_relationship_properties[`@relationshipProperties`]
2019
a| Required to differentiate interfaces that are used for relationship properties, and otherwise.
21-
Can only be used on interfaces, as per its definition:
22-
[source, graphql, indent=0]
23-
----
24-
"""Required to differentiate between interfaces for relationship properties, and otherwise."""
25-
directive @relationshipProperties on OBJECT
26-
----
2720

2821
| xref::/type-definitions/directives/database-mapping.adoc#type-definitions-node[`@node`]
2922
| Specifies the configuration of a GraphQL object type which represents a Neo4j node.
@@ -38,7 +31,6 @@ directive @relationshipProperties on OBJECT
3831

3932
== Security
4033

41-
.Security directives
4234
[cols="2,5"]
4335
|===
4436
| Directive | Description
@@ -54,7 +46,7 @@ directive @relationshipProperties on OBJECT
5446

5547
| xref::/type-definitions/directives/security/configuration.adoc#_nested_claims[`@jwtClaim`]
5648
| Use in combination with `@jwt`.
57-
Configure the JWT authentication filter to include an additional nested JWT claim.
49+
Configures the JWT authentication filter to include an additional nested JWT claim.
5850

5951
| `@subscriptionsAuthorization`
6052
| Specifies authorization rules for subscriptions on the type.
@@ -63,7 +55,6 @@ Configure the JWT authentication filter to include an additional nested JWT clai
6355

6456
== Autogeneration
6557

66-
.Autogeneration directives
6758
[cols="2,5"]
6859
|===
6960
| Directive | Description
@@ -78,13 +69,12 @@ Configure the JWT authentication filter to include an additional nested JWT clai
7869

7970
== Schema configuration
8071

81-
.Schema configuration directives
8272
[cols="2,5"]
8373
|===
8474
| Directive | Description
8575

8676
| xref:/type-definitions/directives/schema-configuration/type-configuration.adoc#_query[`@query`]
87-
| Limits the availability of Query operations in the library.
77+
| Limits the availability of query operations in the library.
8878

8979
| xref:/type-definitions/directives/schema-configuration/type-configuration.adoc#_mutation[`@mutation`]
9080
| Limits the availability of Mutation operations in the library.
@@ -93,7 +83,7 @@ Configure the JWT authentication filter to include an additional nested JWT clai
9383
| Limits subscription operations in the library.
9484

9585
| xref::/type-definitions/directives/schema-configuration/type-configuration.adoc#type-definitions-default-values-default[`@default`]
96-
| Allows for the setting of a default value for a field on object creation.
86+
| Allows the setting of a default value for a field during object creation.
9787

9888
| xref::/type-definitions/directives/schema-configuration/type-configuration.adoc#type-definitions-plural[`@plural`]
9989
| Redefines how to compose the plural of the type for the generated operations.
@@ -112,7 +102,6 @@ Particularly useful for types that are not correctly pluralized or are non-Engli
112102

113103
== Indexes and constraints
114104

115-
.Indexes and constraints directives
116105
[cols="2,5"]
117106
|===
118107
| Directive | Description
@@ -127,13 +116,12 @@ Particularly useful for types that are not correctly pluralized or are non-Engli
127116

128117
== Custom logic
129118

130-
.Custom logic directives
131119
[cols="2,5"]
132120
|===
133121
| Directive | Description
134122

135123
| xref::/type-definitions/directives/custom-logic.adoc#_cypher[`@cypher`]
136-
| Overrides field resolution (including `Query` and `Mutation` fields), instead resolving with the specified Cypher.
124+
| Overrides field resolution (including query and mutation fields), instead resolving with the specified Cypher.
137125

138126
| xref::/type-definitions/directives/custom-logic.adoc#_coalesce[`@coalesce`]
139127
| Exposes a mechanism for querying against non-existent, `null` values on a node.
@@ -152,7 +140,6 @@ of any required fields that is passed as arguments to the custom resolver.
152140

153141
== OGM
154142

155-
.OGM directives
156143
[cols="2,5"]
157144
|===
158145
| Directive | Description
@@ -164,7 +151,6 @@ of any required fields that is passed as arguments to the custom resolver.
164151

165152
== Relay
166153

167-
.Relay directives
168154
[cols="2,5"]
169155
|===
170156
| Directive | Description

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ However, in some cases, it may be advisable to reduce the scope of the API produ
1010

1111
This section provides information on how to limit access to unwanted operations and reduce the size of the schema which can improve the performance:
1212

13-
- xref::schema-configuration/type-configuration.adoc[Type configuration] - How to set up `Query`, `Mutation`, and `Subscription` types.
13+
- xref::schema-configuration/type-configuration.adoc[Type configuration] - How to set up query, mutation, and subscription types.
1414
- xref::schema-configuration/global-configuration.adoc[Global configuration] - How to globally disable specific types of operation.
1515
- xref::schema-configuration/field-configuration.adoc[Field configuration] - How to remove fields from a GraphQL Object Type or a GraphQL Input Object Type.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:description: This page describes how to reduce the operation fields produced using the directives @query, @mutation, and @subscription.
55

66

7-
When representing a Neo4j node, a GraphQL Object Type produces multiple operation fields in the `Query`, `Mutation`, and `Subscription` types.
7+
When representing a Neo4j node, a GraphQL Object Type produces multiple operation fields in the query, mutation, and subscription types.
88
For example:
99

1010
[source, graphql, indent=0]

0 commit comments

Comments
 (0)