Skip to content

Commit a481300

Browse files
Merge remote-tracking branch 'upstream/6.x' into add-breaking-changes-on-migration-guide
2 parents e373b39 + fa20501 commit a481300

32 files changed

+110
-1513
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@
6161
6262
* xref:introspector.adoc[Introspector]
6363
64-
* xref:ogm/index.adoc[]
65-
** xref:ogm/installation.adoc[]
66-
** xref:ogm/directives.adoc[]
67-
** xref:ogm/selection-set.adoc[]
68-
** xref:ogm/type-generation.adoc[]
69-
** xref:ogm/subscriptions.adoc[]
70-
** xref:ogm/reference.adoc[]
71-
7264
* *Frameworks and integrations*
7365
7466
* xref:integrations/apollo-federation.adoc[]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= Custom logic
2-
:page-aliases: type-definitions/cypher.adoc, type-definitions/default-values.adoc, ogm/examples/custom-resolvers.adoc, custom-resolvers.adoc
2+
:page-aliases: type-definitions/cypher.adoc, type-definitions/default-values.adoc, custom-resolvers.adoc
33
:description: This page describes how to use directives for custom logic.
44

55
== `@cypher`

modules/ROOT/pages/directives/index.adoc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,6 @@ of any required fields that is passed as arguments to the custom resolver.
140140

141141
|===
142142

143-
== OGM
144-
145-
[cols="2,5"]
146-
|===
147-
| Directive | Description
148-
149-
| xref::ogm/directives.adoc#_private[`@private`]
150-
| Protects fields which should only be available through the xref::ogm/index.adoc[OGM].
151-
152-
|===
153-
154143
== Relay
155144

156145
[cols="2,5"]

modules/ROOT/pages/driver-configuration.adoc

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This page describes the configuration of the Neo4j GraphQL Library driver.
66

77
== Neo4j Driver
88

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

1111
The examples in this page assume a Neo4j database running at "bolt://localhost:7687" with a username of "username" and a password of "password".
1212

@@ -143,31 +143,10 @@ await startStandaloneServer(server, {
143143
144144
----
145145

146-
=== OGM
147-
148-
[source, javascript, indent=0]
149-
----
150-
import { OGM } from "@neo4j/graphql-ogm";
151-
import neo4j from "neo4j-driver";
152-
153-
const typeDefs = `#graphql
154-
type User @node {
155-
name: String
156-
}
157-
`;
158-
159-
const driver = neo4j.driver(
160-
"bolt://localhost:7687",
161-
neo4j.auth.basic("username", "password")
162-
);
163-
164-
const ogm = new OGM({ typeDefs, driver });
165-
----
166-
167146
[[driver-configuration-database-compatibility]]
168147
== Database compatibility
169148

170-
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.
171150
The `checkNeo4jCompat` throws an `Error` if the DBMS is incompatible, with details of the incompatibilities.
172151

173152
=== `Neo4jGraphQL`
@@ -192,28 +171,6 @@ const neoSchema = new Neo4jGraphQL({ typeDefs, driver });
192171
await neoSchema.checkNeo4jCompat();
193172
----
194173

195-
=== `OGM`
196-
197-
[source, javascript, indent=0]
198-
----
199-
import { OGM } from "@neo4j/graphql-ogm";
200-
import neo4j from "neo4j-driver";
201-
202-
const typeDefs = `#graphql
203-
type User @node {
204-
name: String
205-
}
206-
`;
207-
208-
const driver = neo4j.driver(
209-
"bolt://localhost:7687",
210-
neo4j.auth.basic("username", "password")
211-
);
212-
213-
const ogm = new OGM({ typeDefs, driver });
214-
await ogm.checkNeo4jCompat();
215-
----
216-
217174
== Specifying the Neo4j database
218175

219176
Specify the database to be used within your DBMS via the `database` field under `sessionConfig` in the `context` that all resolvers share.

modules/ROOT/pages/index.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ For every query and mutation that is executed against this generated schema, the
3131
- Options for xref::/directives/database-mapping.adoc[Database mapping] and value xref::/directives/autogeneration.adoc[Autogeneration].
3232
- xref::/queries-aggregations/pagination/index.adoc[Pagination] options.
3333
- xref::/security/index.adoc[Security options] and additional xref::schema-configuration/index.adoc[Schema Configuration].
34-
- An xref::ogm/index.adoc[OGM] (Object Graph Mapper) for programmatic interaction with your GraphQL API.
3534
- A xref::getting-started/toolbox.adoc[Toolbox] (UI) to experiment with your Neo4j GraphQL API on Neo4j Desktop.
3635

3736

modules/ROOT/pages/migration/index.adoc

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ a|
176176
[source, graphql, indent=0]
177177
----
178178
query {
179-
movies(where: { NOT: { title: "The Matrix" } }) {
179+
movies(where: { NOT: { title_EQ: "The Matrix" } }) {
180180
title
181181
}
182182
}
@@ -200,7 +200,7 @@ a|
200200
[source, graphql, indent=0]
201201
----
202202
query {
203-
movies(where: { actors_NOT: { name: "Keanu" } }) {
203+
movies(where: { actors_NOT: { name_EQ: "Keanu" } }) {
204204
title
205205
}
206206
}
@@ -209,7 +209,7 @@ a|
209209
[source, graphql, indent=0]
210210
----
211211
query {
212-
movies(where: { actors_NONE: { name: "Keanu" } }) {
212+
movies(where: { actors_NONE: { name_EQ: "Keanu" } }) {
213213
title
214214
}
215215
}
@@ -300,6 +300,43 @@ a|
300300

301301
== Deprecations and warnings
302302

303+
=== Implicit equality filters are deprecated
304+
305+
The following implicit equality filters are deprecated:
306+
307+
- `{ name: "Keanu" }`
308+
- `{ count: 10 }`
309+
310+
You can achieve the same by using `{ name_EQ: "Keanu" }` and `{ count_EQ: 10 }`.
311+
The deprecated quality filters will be removed in version 7.x.
312+
313+
[cols="1,1"]
314+
|===
315+
|Before | Now
316+
317+
a|
318+
[source, graphql, indent=0]
319+
----
320+
query {
321+
users(where: { name: "John" }) {
322+
id
323+
name
324+
}
325+
}
326+
----
327+
a|
328+
[source, graphql, indent=0]
329+
----
330+
query {
331+
users(where: { name_EQ: "John" }) {
332+
id
333+
name
334+
}
335+
}
336+
----
337+
|===
338+
339+
303340
=== `@node` will have to be explicitly defined
304341

305342
In the future, types without the `@node` directive will no longer be treated as Neo4j nodes.

modules/ROOT/pages/mutations/create.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ mutation {
140140
name: "Tom Hanks",
141141
movies: {
142142
connectOrCreate: {
143-
where: { node: { id: "1234" } }
143+
where: { node: { id_EQ: "1234" } }
144144
onCreate: { node: { title: "Forrest Gump" } }
145145
}
146146
}

modules/ROOT/pages/mutations/delete.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ A single post can be deleted by executing the following GraphQL statement:
4949
----
5050
mutation {
5151
deletePosts(where: {
52-
id: "6042E807-47AE-4857-B7FE-1AADF522DE8B"
52+
id_EQ: "6042E807-47AE-4857-B7FE-1AADF522DE8B"
5353
}) {
5454
nodesDeleted
5555
relationshipsDeleted
@@ -67,7 +67,7 @@ In case you want to delete a `User` *and* all of their posts, you can use a sing
6767
[source, graphql, indent=0]
6868
----
6969
mutation {
70-
deleteUsers(where: { name: "Jane Doe" }, delete: { posts: {} }) {
70+
deleteUsers(where: { name_EQ: "Jane Doe" }, delete: { posts: {} }) {
7171
nodesDeleted
7272
relationshipsDeleted
7373
}
@@ -82,14 +82,14 @@ Essentially, the above query is equivalent to:
8282
mutation {
8383
deleteUsers(
8484
where: {
85-
name: "Jane Doe"
85+
name_EQ: "Jane Doe"
8686
},
8787
delete: {
8888
posts: [
8989
where: {
9090
node: {
9191
creator: {
92-
name: "Jane Doe"
92+
name_EQ: "Jane Doe"
9393
}
9494
}
9595
}

modules/ROOT/pages/mutations/update.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The content of a `Post` can be updated by executing the following GraphQL statem
5959
mutation {
6060
updatePosts(
6161
where: {
62-
id: "892CC104-A228-4BB3-8640-6ADC9F2C2A5F"
62+
id_EQ: "892CC104-A228-4BB3-8640-6ADC9F2C2A5F"
6363
}
6464
update: {
6565
content: "Some new content for this Post!"
@@ -82,7 +82,7 @@ Instead of creating a `Post` with the `create` mutation and then connecting it t
8282
----
8383
mutation {
8484
updateUsers(
85-
where: { name: "John Doe" }
85+
where: { name_EQ: "John Doe" }
8686
update: {
8787
posts: {
8888
create: [
@@ -113,7 +113,7 @@ mutation {
113113
name: "Tom Hanks",
114114
movies: {
115115
connectOrCreate: {
116-
where: { node: { id: "1234" } }
116+
where: { node: { id_EQ: "1234" } }
117117
onCreate: { node: { title: "Forrest Gump" } }
118118
}
119119
}
@@ -134,12 +134,12 @@ mutation {
134134
update: {
135135
movies: {
136136
connectOrCreate: {
137-
where: { node: { id: "1234" } }
137+
where: { node: { id_EQ: "1234" } }
138138
onCreate: { node: { title: "Forrest Gump" } }
139139
}
140140
}
141141
},
142-
where: { name: "Tom Hanks" }
142+
where: { name_EQ: "Tom Hanks" }
143143
) {
144144
info {
145145
nodesCreated
@@ -462,7 +462,7 @@ Here is how you can do that:
462462
----
463463
mutation incrementViewCountMutation {
464464
updateVideos(
465-
where: { id: "VideoID" }
465+
where: { id_EQ: "VideoID" }
466466
update: { views_INCREMENT: 1 }
467467
) {
468468
videos {
@@ -480,7 +480,7 @@ To do that, you have to update the relationship property `revenue`:
480480
----
481481
mutation addRevenueMutation {
482482
updateUsers(
483-
where: { id: "UserID" },
483+
where: { id_EQ: "UserID" },
484484
update: { ownVideo: [{ update: { edge: { revenue_ADD: 0.01 } } }] }
485485
) {
486486
users {

modules/ROOT/pages/ogm/directives.adoc

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)