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
Read more about the xref::introspector.adoc[introspector].
68
68
69
69
[[troubleshooting-query-tuning]]
70
-
== Query Tuning
70
+
== Query tuning
71
71
72
72
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.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/type-definitions/directives/custom-logic.adoc
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ type Query {
117
117
118
118
When returning an object type, all fields of the type must be available in the Cypher return value.
119
119
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:
121
121
122
122
[source, graphql, indent=0]
123
123
----
@@ -263,7 +263,8 @@ type Mutation {
263
263
264
264
== `@coalesce`
265
265
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].
267
268
268
269
This directive helps querying against non-existent properties in a database.
269
270
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:
323
324
The query may still pass a higher or lower `limit`.
324
325
* `max` - defines the maximum limit to be passed to the query.
325
326
If a higher value is passed, it is used instead.
327
+
328
+
[NOTE]
326
329
If no `default` value is set, `max` is used for queries without limit.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/type-definitions/directives/database-mapping.adoc
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,19 @@ Note that, in this case, there is a directive on each "end" of the relationship,
33
33
34
34
== `@relationshipProperties`
35
35
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.
37
49
38
50
For example, for the "ACTED_IN" relationship, add a property "roles":
39
51
@@ -54,7 +66,7 @@ type ActedIn @relationshipProperties {
54
66
}
55
67
----
56
68
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.
58
70
For more information, see xref::/type-definitions/types/relationships.adoc[Type definitions -> Relationships].
59
71
60
72
@@ -238,7 +250,8 @@ type UserLivesInProperties @relationshipProperties {
238
250
}
239
251
----
240
252
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.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/type-definitions/directives/schema-configuration/index.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,6 @@ However, in some cases, it may be advisable to reduce the scope of the API produ
10
10
11
11
This section provides information on how to limit access to unwanted operations and reduce the size of the schema which can improve the performance:
12
12
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.
14
14
- xref::schema-configuration/global-configuration.adoc[Global configuration] - How to globally disable specific types of operation.
15
15
- xref::schema-configuration/field-configuration.adoc[Field configuration] - How to remove fields from a GraphQL Object Type or a GraphQL Input Object Type.
0 commit comments