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/deprecations.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ The following products and applications are deprecated:
9
9
10
10
== GRANDstack starter app
11
11
12
-
The main purpose of the GRANDstack starter app was to demonstrate how the Neo4j Labs GraphQL library could be used in the context of a full-stack application using React and Apollo client.
12
+
The main purpose of the GRANDstack starter app was to demonstrate how the Neo4j Labs GraphQL Library could be used in the context of a full-stack application using React and Apollo client.
13
13
It allowed developers to build applications more quickly and with a bigger focus on functionality, while also helping users who already had an existing frontend and needed a new back end.
14
14
15
15
Over time, the GRANDstack starter app grew to support other frameworks such as Flutter and Angular, thus the need to revisit its scope.
16
-
The intention is to replace this project with a new starter application product, which will focus on the back end and the configuration of the GraphQL library, as well as help developers with their frontend.
16
+
The intention is to replace this project with a new starter application product, which will focus on the back end and the configuration of the GraphQL Library, as well as help developers with their frontend.
17
17
18
18
In the meantime, the `create-grandstack-app` npm package has been marked as deprecated.
19
19
It can still be used to skeleton a GRANDstack app, but the user will be warned that the package is deprecated.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/migration/index.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The following deprecated `NOT` filters are removed from the schema since they ar
34
34
- `edge_NOT`
35
35
36
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.
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
38
39
39
[cols="1,1"]
40
40
|===
@@ -68,7 +68,7 @@ The following deprecated `_NOT` filters on `@relationship` are removed and no lo
68
68
- `actors_NOT`
69
69
- `actorsConnection_NOT`
70
70
71
-
To achieve the same in version 6.x of the GraphQL library, use the `NONE` quantifier.
71
+
To achieve the same in version 6.x of the GraphQL Library, use the `NONE` quantifier.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/mutations/create.adoc
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
:description: This page describes how to create nodes through mutations.
3
3
= `create`
4
4
5
-
Using the following type definitions:
5
+
Consider the following type definitions:
6
6
7
7
[source, graphql, indent=0]
8
8
----
@@ -19,7 +19,7 @@ type User @node {
19
19
}
20
20
----
21
21
22
-
These `create` mutations and response types should be generated:
22
+
The following `create` mutations and response types are generated:
23
23
24
24
[source, graphql, indent=0]
25
25
----
@@ -65,11 +65,12 @@ mutation {
65
65
}
66
66
----
67
67
68
-
This should create a `User` with name "John Doe", and that name plus the autogenerated ID should be returned.
68
+
This creates a `User` with the name "John Doe".
69
+
The name and the autogenerated ID are returned.
69
70
70
71
== Nested `create`
71
72
72
-
A `User` and an initial `Post` can be created by executing the following:
73
+
You can create a `User` and their initial `Post` at once by executing the following:
73
74
74
75
[source, graphql, indent=0]
75
76
----
@@ -101,7 +102,7 @@ mutation {
101
102
----
102
103
103
104
This creates a `User` with name "John Doe" and an introductory post.
104
-
Both should be returned with their autogenerated IDs.
105
+
Both are returned with their autogenerated IDs.
105
106
106
107
[NOTE]
107
108
====
@@ -111,7 +112,7 @@ Read about xref:mutations/update.adoc#_connectorcreate_relationships[`update`] f
111
112
112
113
== `connectOrCreate` relationships
113
114
114
-
If a related node has the `@unique` directive defined, `connectOrCreate` can be used in a nested `create` to perform a `MERGE` operation on the related node.
115
+
If a related node has the `@unique` directive defined, you can use `connectOrCreate` nested in a `create` mutation to perform an operation similar to a link:https://neo4j.com/docs/cypher-manual/current/clauses/merge/[Cypher `MERGE`] operation on the related node.
115
116
This will create a new relationship and the related node if it doesn't exist yet.
116
117
117
118
Consider the following type definitions:
@@ -130,7 +131,7 @@ type Movie @node {
130
131
}
131
132
----
132
133
133
-
Because a movie ID is unique, `connectOrCreate` can be used in an `Actor` mutation to ensure the movie exists in the database before connecting.
134
+
Since a movie ID is unique, you can use `connectOrCreate` in an `Actor` mutation to ensure the movie exists in the database before connecting them.
134
135
Note that only `@unique` or `@id` fields can be used in `where`:
135
136
136
137
[source, graphql, indent=0]
@@ -152,15 +153,17 @@ mutation {
152
153
}
153
154
----
154
155
155
-
This will ensure that a movie with ID 1234 exists and it is connected to `"Tom Hanks"`. If the movie does not exist, it will be created with the title `"Forrest Gump"`. Note that if the movie with the given ID already exists, it will be connected to it, regardless of the title.
156
+
This ensures that a movie with ID 1234 exists and is connected to `"Tom Hanks"`.
157
+
If the movie does not exist, it will be created with the title `"Forrest Gump"`.
158
+
If a movie with the given ID already exists, it will also be connected to `"Tom Hanks"`, and keep whatever title it has.
156
159
157
-
== `CREATE` optimization
160
+
== `create` optimization
158
161
159
-
With the `create` operations, there is no limit on how many nodes can be created at once.
162
+
With `create` operations, there is no limit on how many nodes can be created at once.
160
163
However, there is a known performance issue for large batch sizes.
161
164
162
165
The Neo4j GraphQL Library contains an optimization feature designed to mitigate it, but it does not work in the following scenarios:
163
166
164
167
* A field is populated using the directive `@populated_by`.
165
-
* The `connect` or `connectOrCreate` operation is used.
168
+
* The `connect` or `connectOrCreate` operations are used.
166
169
* Interface and union types are present in the mutation.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/mutations/delete.adoc
+7-45Lines changed: 7 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
= `delete`
6
6
7
-
Using these type definitions:
7
+
Consider these type definitions:
8
8
9
9
[source, graphql, indent=0]
10
10
----
@@ -21,7 +21,7 @@ type User @node {
21
21
}
22
22
----
23
23
24
-
These `delete` mutations and response types should be generated:
24
+
The following `delete` mutations and response types are generated:
25
25
26
26
[source, graphql, indent=0]
27
27
----
@@ -43,7 +43,7 @@ The `DeleteInfo` type is the common return type for all delete mutations.
43
43
44
44
== Single `delete`
45
45
46
-
A single post can be deleted by executing the following GraphQL statement:
46
+
You can delete a single post by executing the following GraphQL statement:
47
47
48
48
[source, graphql, indent=0]
49
49
----
@@ -57,12 +57,12 @@ mutation {
57
57
}
58
58
----
59
59
60
-
This should delete the post using the autogenerated ID that was returned after that post's creation.
61
-
Consequently, `nodesDeleted` should be equal `1` (the post) and `relationshipsDeleted` should also equal `1` as the `HAS_POST` relationship between the `Post` and its author was deleted.
60
+
This deletes the post using the autogenerated ID that was returned after the creation of the post.
61
+
Consequently, `nodesDeleted` is equal to `1` (the post) and `relationshipsDeleted` is also equal to `1` as the `HAS_POST` relationship between the `Post` and its author was deleted.
62
62
63
63
== Nested `delete`
64
64
65
-
In case you want to delete a `User` *and* all of their posts, you can use a single nested `delete` mutation:
65
+
In case you want to delete a `User` and all of their posts, you can use a single nested `delete` mutation:
66
66
67
67
[source, graphql, indent=0]
68
68
----
@@ -72,42 +72,4 @@ mutation {
72
72
relationshipsDeleted
73
73
}
74
74
}
75
-
----
76
-
77
-
By the time the traversal has reached it, that empty `where` argument has the context of only refer to posts that were created by Jane Doe, as the traversals to those `Post` nodes were from her `User` node.
78
-
Essentially, the above query is equivalent to:
79
-
80
-
[source, graphql, indent=0]
81
-
----
82
-
mutation {
83
-
deleteUsers(
84
-
where: {
85
-
name_EQ: "Jane Doe"
86
-
},
87
-
delete: {
88
-
posts: [
89
-
where: {
90
-
node: {
91
-
creator: {
92
-
name_EQ: "Jane Doe"
93
-
}
94
-
}
95
-
}
96
-
]
97
-
}
98
-
) {
99
-
nodesDeleted
100
-
relationshipsDeleted
101
-
}
102
-
}
103
-
----
104
-
105
-
Note that the output Cypher statement should also have a redundant `WHERE` clause:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/mutations/index.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
:description: This section describes how to use mutations with the Neo4j GraphQL Library.
4
4
5
5
6
-
This section addresses basic examples of the following mutations:
6
+
This page shows examples of the following mutations:
7
7
8
8
- xref::mutations/create.adoc[`create`] - create nodes, and recursively create or connect further nodes in the graph.
9
9
- xref::mutations/update.adoc[`update`] - update nodes, and recursively perform any operations from there.
@@ -15,5 +15,5 @@ In order to provide the abstractions available in these mutations, the output Cy
15
15
This can result in your database throwing out-of-memory errors depending on its configuration.
16
16
17
17
If this becomes a regular occurrence, you can adjust the link:https://neo4j.com/docs/operations-manual/current/configuration/configuration-settings/#config_server.memory.heap.max_size[`server.memory.heap.max_size`] parameter in the DBMS settings.
18
-
If you need to perform major data migrations, it may be best to manually write the necessary Cypher and execute this directly in the database.
18
+
If you must perform major data migrations, it may be best to manually write the necessary Cypher and execute this directly in the database.
0 commit comments