Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions modules/ROOT/pages/migration/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,42 @@ query {

== Deprecations and warnings

=== Implicit equality filters are deprecated

Implicit equality filters such as:

- `{ name: "Keanu" }`
- `{ count: 10 }`

Are deprecated in favor of `{ name_EQ: "Keanu" }` and `{ count_EQ: 10 }` respectively and will be removed in the next major version.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
query {
users(where: { name: "John" }) {
id
name
}
}
----
a|
[source, graphql, indent=0]
----
query {
users(where: { name_EQ: "John" }) {
id
name
}
}
----
|===


=== `@node` will have to be explicitly defined

In the future, types without the `@node` directive will no longer be treated as Neo4j nodes.
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/mutations/create.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ mutation {
name: "Tom Hanks",
movies: {
connectOrCreate: {
where: { node: { id: "1234" } }
where: { node: { id_EQ: "1234" } }
onCreate: { node: { title: "Forrest Gump" } }
}
}
Expand Down
8 changes: 4 additions & 4 deletions modules/ROOT/pages/mutations/delete.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ A single post can be deleted by executing the following GraphQL statement:
----
mutation {
deletePosts(where: {
id: "6042E807-47AE-4857-B7FE-1AADF522DE8B"
id_EQ: "6042E807-47AE-4857-B7FE-1AADF522DE8B"
}) {
nodesDeleted
relationshipsDeleted
Expand All @@ -67,7 +67,7 @@ In case you want to delete a `User` *and* all of their posts, you can use a sing
[source, graphql, indent=0]
----
mutation {
deleteUsers(where: { name: "Jane Doe" }, delete: { posts: {} }) {
deleteUsers(where: { name_EQ: "Jane Doe" }, delete: { posts: {} }) {
nodesDeleted
relationshipsDeleted
}
Expand All @@ -82,14 +82,14 @@ Essentially, the above query is equivalent to:
mutation {
deleteUsers(
where: {
name: "Jane Doe"
name_EQ: "Jane Doe"
},
delete: {
posts: [
where: {
node: {
creator: {
name: "Jane Doe"
name_EQ: "Jane Doe"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions modules/ROOT/pages/mutations/update.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The content of a `Post` can be updated by executing the following GraphQL statem
mutation {
updatePosts(
where: {
id: "892CC104-A228-4BB3-8640-6ADC9F2C2A5F"
id_EQ: "892CC104-A228-4BB3-8640-6ADC9F2C2A5F"
}
update: {
content: "Some new content for this Post!"
Expand All @@ -82,7 +82,7 @@ Instead of creating a `Post` with the `create` mutation and then connecting it t
----
mutation {
updateUsers(
where: { name: "John Doe" }
where: { name_EQ: "John Doe" }
update: {
posts: {
create: [
Expand Down Expand Up @@ -113,7 +113,7 @@ mutation {
name: "Tom Hanks",
movies: {
connectOrCreate: {
where: { node: { id: "1234" } }
where: { node: { id_EQ: "1234" } }
onCreate: { node: { title: "Forrest Gump" } }
}
}
Expand All @@ -134,12 +134,12 @@ mutation {
update: {
movies: {
connectOrCreate: {
where: { node: { id: "1234" } }
where: { node: { id_EQ: "1234" } }
onCreate: { node: { title: "Forrest Gump" } }
}
}
},
where: { name: "Tom Hanks" }
where: { name_EQ: "Tom Hanks" }
) {
info {
nodesCreated
Expand Down Expand Up @@ -462,7 +462,7 @@ Here is how you can do that:
----
mutation incrementViewCountMutation {
updateVideos(
where: { id: "VideoID" }
where: { id_EQ: "VideoID" }
update: { views_INCREMENT: 1 }
) {
videos {
Expand All @@ -480,7 +480,7 @@ To do that, you have to update the relationship property `revenue`:
----
mutation addRevenueMutation {
updateUsers(
where: { id: "UserID" },
where: { id_EQ: "UserID" },
update: { ownVideo: [{ update: { edge: { revenue_ADD: 0.01 } } }] }
) {
users {
Expand Down
10 changes: 5 additions & 5 deletions modules/ROOT/pages/queries-aggregations/filtering.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ query {
]
},
{
movies_SOME: { title: "The Matrix" }
movies_SOME: { title_EQ: "The Matrix" }
}
]}
) {
Expand All @@ -54,7 +54,7 @@ For example:
[source, graphql, indent=0]
----
query {
users(where: {name: "John" })
users(where: { name_EQ: "John" })
id
name
}
Expand All @@ -66,7 +66,7 @@ For non-equality, you must use the xref:/queries-aggregations/filtering.adoc#_bo
[source, graphql, indent=0]
----
query {
users(where: { NOT: {name: "John" }})
users(where: { NOT: { name_EQ: "John" }})
id
name
}
Expand Down Expand Up @@ -376,7 +376,7 @@ For example:
[source, graphql, indent=0]
----
query {
posts(where: { author: { id: "7CF1D9D6-E527-4ACD-9C2A-207AE0F5CB8C" } }) {
posts(where: { author: { id_EQ: "7CF1D9D6-E527-4ACD-9C2A-207AE0F5CB8C" } }) {
content
}
}
Expand All @@ -386,7 +386,7 @@ query {
[source, graphql, indent=0]
----
query {
posts(where: { NOT: { author: { id: "7CF1D9D6-E527-4ACD-9C2A-207AE0F5CB8C" } } }) {
posts(where: { NOT: { author: { id_EQ: "7CF1D9D6-E527-4ACD-9C2A-207AE0F5CB8C" } } }) {
content
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you wanted to fetch the posts of user "John Smith" 10 at a time, you would fi
[source, graphql, indent=0]
----
query {
users(where: { name: "John Smith" }) {
users(where: { name_EQ: "John Smith" }) {
name
postsConnection(first: 10) {
edges {
Expand All @@ -46,7 +46,7 @@ In the return value, if `hasNextPage` is `true`, you would pass `endCursor` into
[source, graphql, indent=0]
----
query Users($after: String) {
users(where: { name: "John Smith" }) {
users(where: { name_EQ: "John Smith" }) {
name
postsConnection(first: 10, after: $after) {
edges {
Expand All @@ -72,7 +72,7 @@ The Connection fields also offer a `totalCount` field which can be used to calcu
[source, graphql, indent=0]
----
query Users($after: String) {
users(where: { name: "John Smith" }) {
users(where: { name_EQ: "John Smith" }) {
name
postsConnection(first: 10) {
edges {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Say that in addition to the `User` type above, there is also a `Post` type which
----
query {
users(where: {
name: "Billy"
name_EQ: "Billy"
}) {
name
posts(options: {
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/queries-aggregations/queries.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ query {
[source, graphql, indent=0]
----
query {
users(where: { name: "Jane Smith" }) {
users(where: { name_EQ: "Jane Smith" }) {
id
name
posts {
Expand Down
12 changes: 6 additions & 6 deletions modules/ROOT/pages/security/authorization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type User @node {
}

type Post @node @authorization(filter: [
{ where: { node: { author: { id: "$jwt.sub" } } } }
{ where: { node: { author: { id_EQ: "$jwt.sub" } } } }
]) {
title: String!
content: String!
Expand All @@ -58,7 +58,7 @@ For instance, to only require filtering for the reading and aggregating posts:
[source, graphql, indent=0]
----
type Post @node @authorization(filter: [
{ operations: [READ, AGGREGATE] where: { node: { author: { id: "$jwt.sub" } } } }
{ operations: [READ, AGGREGATE] where: { node: { author: { id_EQ: "$jwt.sub" } } } }
]) {
title: String!
content: String!
Expand Down Expand Up @@ -87,7 +87,7 @@ type JWT @jwt {
}

type User @node @authorization(validate: [
{ where: { node: { id: "$jwt.sub" } } }
{ where: { node: { id_EQ: "$jwt.sub" } } }
{ where: { jwt: { roles_INCLUDES: "admin" } } }
]) {
id: ID!
Expand All @@ -112,7 +112,7 @@ For instance, to only require validation for the update or deletion of a post:
[source, graphql, indent=0]
----
type Post @node @authorization(validate: [
{ operations: [UPDATE, DELETE] where: { node: { author: { id: "$jwt.sub" } } } }
{ operations: [UPDATE, DELETE] where: { node: { author: { id_EQ: "$jwt.sub" } } } }
]) {
title: String!
content: String!
Expand Down Expand Up @@ -140,8 +140,8 @@ type User @node {
}

type Post @node @authorization(filter: [
{ where: { node: { author: { id: "$jwt.sub" } } } }
{ requireAuthentication: false, operations: [READ], where: { node: { public: true } } }
{ where: { node: { author: { id_EQ: "$jwt.sub" } } } }
{ requireAuthentication: false, operations: [READ], where: { node: { public_EQ: true } } }
]) {
title: String!
content: String!
Expand Down
10 changes: 5 additions & 5 deletions modules/ROOT/pages/security/operations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For single `delete` mutations, rules with `DELETE` on the object are evaluated:
[source, graphql, indent=0]
----
mutation {
deleteMovies(where: { title: "The Matrix" }) { # DELETE ON OBJECT Movie
deleteMovies(where: { title_EQ: "The Matrix" }) { # DELETE ON OBJECT Movie
nodesDeleted
}
}
Expand All @@ -75,8 +75,8 @@ For `delete` mutations with nested delete operations, rules with operation `DELE
----
mutation {
deleteMovies( # DELETE ON OBJECT Movie
where: { title: "The Matrix" }
delete: { actors: { where: { node: { name: "Keanu" } } } } # DELETE ON OBJECT Actor
where: { title_EQ: "The Matrix" }
delete: { actors: { where: { node: { name_EQ: "Keanu" } } } } # DELETE ON OBJECT Actor
) {
nodesDeleted
}
Expand All @@ -89,8 +89,8 @@ For a complex `update` mutation with many effects, a variety of rules is evaluat
----
mutation {
updateMovies(
where: { title: "The Matrix" }
connect: { actors: { where: { node: { name: "Keanu" } } } } # CONNECT ON OBJECT Actor and Movie
where: { title_EQ: "The Matrix" }
connect: { actors: { where: { node: { name_EQ: "Keanu" } } } } # CONNECT ON OBJECT Actor and Movie
update: { # UPDATE ON OBJECT Movie
title: "Speed" # UPDATE ON FIELD_DEFINITION Movie.title
}
Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/security/subscriptions-authorization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For instance, here is how to filter out `User` events which don't match the JWT
[source, graphql, indent=0]
----
type User @node @subscriptionsAuthorization(filter: [
{ where: { node: { id: "$jwt.sub" } } }
{ where: { node: { id_EQ: "$jwt.sub" } } }
]) {
id: ID!
}
Expand All @@ -40,7 +40,7 @@ For instance, to only require filtering for mutations to a type itself and not i
[source, graphql, indent=0]
----
type User @node @subscriptionsAuthorization(filter: [
{ events: [CREATED, UPDATED, DELETED], where: { node: { id: "$jwt.sub" } } }
{ events: [CREATED, UPDATED, DELETED], where: { node: { id_EQ: "$jwt.sub" } } }
]) {
id: ID!
}
Expand All @@ -56,7 +56,7 @@ For instance, in the case where some `Post` nodes are private whilst other `Post
[source, graphql, indent=0]
----
type Post @node @subscriptionsAuthorization(filter: [
{ requireAuthentication: false, where: { node: { public: true } } }
{ requireAuthentication: false, where: { node: { public_EQ: true } } }
]) {
title: String!
content: String!
Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/subscriptions/events.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ mutation {
mutation {
deleteMovies(
where: {
title: "John Wick"
title_EQ: "John Wick"
}
) {
nodesDeleted
Expand Down Expand Up @@ -1490,7 +1490,7 @@ mutation {
mutation {
deleteMovies(
where: {
title: "New York Stories"
title_EQ: "New York Stories"
}
) {
nodesDeleted
Expand Down Expand Up @@ -1667,7 +1667,7 @@ mutation {
mutation {
deleteMovies(
where: {
title: "Sweeney Todd"
title_EQ: "Sweeney Todd"
}
) {
nodesDeleted
Expand Down
Loading