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: README.adoc
+32-2Lines changed: 32 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
= Neo4j GraphQL Library
1
+
= Neo4j GraphQL library docs
2
2
3
3
This repo contains the documentation for the Neo4j GraphQL Library.
4
4
5
-
== Prereqs
5
+
== Prerequisites
6
6
7
7
- link:https://nodejs.org/en/download/[Node.js]
8
8
- npm
@@ -113,3 +113,33 @@ When we publish preview content to either development or production environments
113
113
114
114
You can use the link:https://www.npmjs.com/package/@neo4j-antora/antora-add-notes[antora-add-notes] extension to add content to your pages.
115
115
Follow the Usage instructions in the package documentation.
116
+
117
+
== Repository and pull requests
118
+
119
+
=== Enable automatic cherry-picking on a PR
120
+
121
+
To enable automatic cherry-picking on a PR, add the label `auto-cherry-pick` to it.
122
+
Without it, the responsible GitHub action is not going to be triggered.
123
+
124
+
To select the target branches you would like to cherry-pick your PR to, add labels of the following structure: `auto-cherry-pick-to-<targetBranch>`.
125
+
For example: `auto-cherry-pick-to-6.x` to cherry-pick it to the branch `6.x` or `auto-cherry-pick-to-5.x` for the branch `5.x`.
126
+
You may even add new labels for branches that do not have such a label yet.
127
+
128
+
The feature is triggered by either merging a PR with the `auto-cherry-pick` label or by adding the `auto-cherry-pick` label to an already closed and merged PR.
129
+
In the latter case, ensure that you first add the labels containing the target branches and then finally the `auto-cherry-pick` label.
130
+
Otherwise the automation starts without any target branches.
131
+
132
+
==== Details
133
+
134
+
The PRs created by this GitHub action will have their heading prefixed with `[Cherry-pick][<targetBranch>]`.
135
+
So, for example, for `6.x` as the target branch and `some changes` as the original PR heading, it results in `[Cherry-pick][6.x] some changes` as the heading for the cherry-picked PR.
136
+
In case an assignee was set for the original PR, the cherry-picked PRs will also receive the same assignee.
137
+
You must add reviewers manually after the cherry-picked PRs have been created.
138
+
139
+
The creation of cherry-picked PRs can take a few minutes.
140
+
If you are an assignee of the original PR, you receive an email notification once the cherry-picked PRs have been created.
141
+
The original PR is updated with a comment that contains links to the newly created cherry-picked PRs.
142
+
143
+
In case of a merge conflict while cherry-picking to a specific release branch, the branch will be skipped. Information on skipped branches is also included in the comment added to the original PR.
144
+
In that case you will have to take care of cherry-picking manually and resolve the conflicts.
145
+
This is not going to influence the other release branches as long as they do not have conflicts.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/directives/indexes-and-constraints.adoc
+10-13Lines changed: 10 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,11 @@ directive @unique(
18
18
) on FIELD_DEFINITION
19
19
----
20
20
21
-
Using this directive does not automatically ensure the existence of these constraints, and you will need to run a function on server startup.
22
-
See the section xref::/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints] for details.
21
+
Using this directive does not automatically ensure the existence of these constraints, and you will need to create them manually.
23
22
24
23
=== Usage
25
24
26
-
`@unique` directives can only be used in GraphQL object types representing nodes, and they are only applicable for the "main" label for the node.
25
+
`@unique` directives can only be used in GraphQL object types representing nodes, for any label specified on them.
27
26
28
27
In the following example, a unique constraint is asserted for the label `Colour` and the property `hexadecimal`:
29
28
@@ -53,7 +52,7 @@ type Colour @node(labels: ["Color"]) {
53
52
----
54
53
55
54
In the following example, all labels specified in the `labels` argument of the `@node` directive are also checked when asserting constraints.
56
-
If there is a unique constraint specified for the `hexadecimal` property of nodes with the `Hue` label, but not the `Color` label, no error is thrown and no new constraints are created when running `assertIndexesAndConstraints`.
55
+
If there is a unique constraint specified for the `hexadecimal` property of nodes with the `Hue` label, but not the `Color` label, no error is thrown when running `assertIndexesAndConstraints`.
57
56
58
57
[source, graphql, indent=0]
59
58
----
@@ -64,7 +63,7 @@ type Colour @node(labels: ["Color", "Hue"]) {
64
63
65
64
== Fulltext indexes
66
65
67
-
You can use the `@fulltext` directive to add a https://neo4j.com/docs/cypher-manual/current/indexes-for-full-text-search/[Full text index] inside Neo4j.
66
+
You can use the `@fulltext` directive to specify a https://neo4j.com/docs/cypher-manual/current/indexes-for-full-text-search/[full-text index] inside Neo4j.
68
67
For example:
69
68
70
69
[source, graphql, indent=0]
@@ -82,13 +81,12 @@ directive @fulltext(indexes: [FullTextInput]!) on OBJECT
82
81
----
83
82
84
83
Using this directive does not automatically ensure the existence of these indexes.
85
-
You need to run a function on server startup.
86
-
See the section xref::/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints] for details.
84
+
They must be created manually.
87
85
88
86
=== Specifying
89
87
90
88
The `@fulltext` directive can be used on nodes.
91
-
In this example, a `Fulltext` index called "ProductName", for the name `field`, on the `Product` node, is added:
89
+
In this example, a full-text index called "ProductName", for the name `field`, on the `Product` node, is specified:
When you run xref::/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints], they create the index like so:
99
+
This index can be created in the database by running the following Cypher:
102
100
103
101
[source, cypher, indent=0]
104
102
----
@@ -224,8 +222,8 @@ query {
224
222
== Asserting constraints
225
223
226
224
In order to ensure that the specified constraints exist in the database, you need to run the function `assertIndexesAndConstraints`.
227
-
A simple example to create the necessary constraints might look like the following, assuming a valid driver instance in the variable `driver`.
228
-
This creates two constraints, one for each field decorated with `@id` and `@unique`, and apply the indexes specified in `@fulltext`:
225
+
A simple example to check for the existence of the necessary constraints might look like the following, assuming a valid driver instance in the variable `driver`.
226
+
This checks for the unique node property constraint for the field decorated `@unique`, and checks for the index specified in `@fulltext`:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/driver-configuration.adoc
+2-45Lines changed: 2 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This page describes the configuration of the Neo4j GraphQL Library driver.
6
6
7
7
== Neo4j Driver
8
8
9
-
For the Neo4j GraphQL Library to work, either an instance of the https://github.com/neo4j/neo4j-javascript-driver[Neo4j JavaScript driver] must be passed in on construction of your `Neo4jGraphQL` instance (or alternatively, `OGM`), or a driver, session or transaction passed into the `context.executionContext` per request.
9
+
For the Neo4j GraphQL Library to work, either an instance of the https://github.com/neo4j/neo4j-javascript-driver[Neo4j JavaScript driver] must be passed in on construction of your `Neo4jGraphQL` instance, or a driver, session or transaction passed into the `context.executionContext` per request.
10
10
11
11
The examples in this page assume a Neo4j database running at "bolt://localhost:7687" with a username of "username" and a password of "password".
Use the `checkNeo4jCompat` method available on either a `Neo4jGraphQL` or `OGM` instance to ensure the specified DBMS is of the required version, and has the necessary functions and procedures available.
149
+
Use the `checkNeo4jCompat` method available on a `Neo4jGraphQL` instance to ensure the specified DBMS is of the required version, and has the necessary functions and procedures available.
171
150
The `checkNeo4jCompat` throws an `Error` if the DBMS is incompatible, with details of the incompatibilities.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/migration/index.adoc
+110Lines changed: 110 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,119 @@ npm update @neo4j/graphql
20
20
21
21
Here is a list of all the breaking changes from version 5.0.0 to 6.0.0.
22
22
23
+
=== The deprecated `_NOT` filters are no longer supported
24
+
25
+
The following deprecated `NOT` filters are removed from the schema since they are no longer supported:
26
+
27
+
- `_NOT`
28
+
- `_NOT_CONTAINS`
29
+
- `_NOT_ENDS_WITH`
30
+
- `_NOT_IN`
31
+
- `_NOT_STARTS_WITH`
32
+
- `_NOT_INCUDES`
33
+
- `node_NOT`
34
+
- `edge_NOT`
35
+
36
+
37
+
To achieve the same in version 6.x of the GraphQL library, use the xref:/queries-aggregations/filtering.adoc#_boolean_operators[boolean `NOT` operator] instead.
38
+
39
+
[cols="1,1"]
40
+
|===
41
+
|Before | Now
42
+
43
+
a|
44
+
[source, graphql, indent=0]
45
+
----
46
+
query {
47
+
movies(where: { title_NOT: "The Matrix" }) {
48
+
title
49
+
}
50
+
}
51
+
52
+
----
53
+
a|
54
+
[source, graphql, indent=0]
55
+
----
56
+
query {
57
+
movies(where: { NOT: { title_EQ: "The Matrix" } }) {
58
+
title
59
+
}
60
+
}
61
+
----
62
+
|===
63
+
64
+
=== The deprecated `_NOT` on `@relationship` filters are no longer supported
65
+
66
+
The following deprecated `_NOT` filters on `@relationship` are removed and no longer supported:
67
+
68
+
- `actors_NOT`
69
+
- `actorsConnection_NOT`
70
+
71
+
To achieve the same in version 6.x of the GraphQL library, use the `NONE` quantifier.
0 commit comments