Skip to content

Commit a84c1b4

Browse files
authored
Merge branch '6.x' into update-subscriptions-docs
2 parents e2596c3 + d64b6b9 commit a84c1b4

File tree

6 files changed

+25
-101
lines changed

6 files changed

+25
-101
lines changed

modules/ROOT/pages/directives/schema-configuration/field-configuration.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It generates the type `Actor`:
2727
type Actor {
2828
name: String!
2929
age: Int
30-
actedIn(where: MovieWhere, options: MovieOptions, directed: Boolean = true): [Movie!]!
30+
actedIn(where: MovieWhere, sort: [MovieSort!]!, limit: Int, offset: Int, directed: Boolean = true): [Movie!]!
3131
actedInAggregate(where: MovieWhere, directed: Boolean = true): ActorMovieActedInAggregationSelection
3232
actedInConnection(where: ActorActedInConnectionWhere, first: Int, after: String, directed: Boolean = true, sort: [ActorActedInConnectionSort!]): ActorActedInConnection!
3333
}
@@ -56,7 +56,7 @@ Now the type `Actor` looks like this:
5656
----
5757
type Actor {
5858
name: String!
59-
actedIn(where: MovieWhere, options: MovieOptions, directed: Boolean = true): [Movie!]!
59+
actedIn(where: MovieWhere, sort: [MovieSort!]!, limit: Int, offset: Int, directed: Boolean = true): [Movie!]!
6060
actedInAggregate(where: MovieWhere, directed: Boolean = true): ActorMovieActedInAggregationSelection
6161
actedInConnection(where: ActorActedInConnectionWhere, first: Int, after: String, directed: Boolean = true, sort: [ActorActedInConnectionSort!]): ActorActedInConnection!
6262
}
@@ -105,7 +105,7 @@ From the previous type definitions, the type `Actor` produced is:
105105
----
106106
type Actor {
107107
name: String!
108-
actedIn(where: MovieWhere, options: MovieOptions, directed: Boolean = true): [Movie!]!
108+
actedIn(where: MovieWhere, sort: [MovieSort!]!, limit: Int, offset: Int, directed: Boolean = true): [Movie!]!
109109
actedInAggregate(where: MovieWhere, directed: Boolean = true): ActorMovieActedInAggregationSelection
110110
actedInConnection(where: ActorActedInConnectionWhere, first: Int, after: String, directed: Boolean = true, sort: [ActorActedInConnectionSort!]): ActorActedInConnection!
111111
}
@@ -135,7 +135,7 @@ In this case, as the argument `aggregate` was passed as false, the type `Actor`
135135
type Actor {
136136
name: String!
137137
age: Int
138-
actedIn(where: MovieWhere, options: MovieOptions, directed: Boolean = true): [Movie!]!
138+
actedIn(where: MovieWhere, sort: [MovieSort!]!, limit: Int, offset: Int, directed: Boolean = true): [Movie!]!
139139
actedInConnection(where: ActorActedInConnectionWhere, first: Int, after: String, directed: Boolean = true, sort: [ActorActedInConnectionSort!]): ActorActedInConnection!
140140
}
141141
----
@@ -269,7 +269,7 @@ From the previous type definitions, the type `Actor` produced is:
269269
----
270270
type Actor {
271271
name: String!
272-
actedIn(where: MovieWhere, options: MovieOptions, directed: Boolean = true): [Movie!]!
272+
actedIn(where: MovieWhere, sort: [MovieSort!]!, limit: Int, offset: Int, directed: Boolean = true): [Movie!]!
273273
actedInAggregate(where: MovieWhere, directed: Boolean = true): ActorMovieActedInAggregationSelection
274274
actedInConnection(where: ActorActedInConnectionWhere, first: Int, after: String, directed: Boolean = true, sort: [ActorActedInConnectionSort!]): ActorActedInConnection!
275275
}
@@ -437,7 +437,7 @@ input MovieWhere {
437437
OR: [MovieWhere!]
438438
AND: [MovieWhere!]
439439
NOT: MovieWhere
440-
title: String
440+
title_EQ: String
441441
title_IN: [String!]
442442
title_CONTAINS: String
443443
title_STARTS_WITH: String
@@ -507,7 +507,7 @@ input MovieWhere {
507507
OR: [MovieWhere!]
508508
AND: [MovieWhere!]
509509
NOT: MovieWhere
510-
title: String
510+
title_EQ: String
511511
title_IN: [String!]
512512
title_CONTAINS: String
513513
title_STARTS_WITH: String

modules/ROOT/pages/optimization.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ const neoSchema = new Neo4jGraphQL({
2323
driver,
2424
features: {
2525
excludeDeprecatedFields: {
26-
bookmark: true,
27-
negationFilters: true,
28-
arrayFilters: true,
29-
stringAggregation: true,
30-
aggregationFilters: true,
26+
implicitEqualFilters: true;
27+
deprecatedOptionsArgument: true;
28+
directedArgument: true;
3129
},
3230
},
3331
});
3432
```
3533

34+
;
35+

modules/ROOT/pages/queries-aggregations/aggregations.adoc

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ For which the following query fields are generated:
3333
[source, graphql, indent=0]
3434
----
3535
type Query {
36-
posts(where: PostWhere, options: PostOptions): [Post!]!
36+
posts(where: PostWhere, sort: [PostSort!]!, limit: Int, offset: Int,): [Post!]!
3737
postsAggregate(where: PostWhere): PostAggregationSelection!
3838
39-
users(where: UserWhere, options: UserOptions): [User!]!
39+
users(where: UserWhere, sort: [UserSort!]!, limit: Int, offset: Int,): [User!]!
4040
usersAggregate(where: UserWhere): UserAggregationSelection!
4141
}
4242
----
@@ -180,17 +180,3 @@ query {
180180
}
181181
----
182182

183-
When performing an aggregation on related nodes, the query against the relationship
184-
can be defined as "undirected" by using the argument `directed: false`:
185-
186-
[source, graphql, indent=0]
187-
----
188-
query {
189-
users {
190-
id
191-
postsAggregate(directed: false) {
192-
count
193-
}
194-
}
195-
}
196-
----

modules/ROOT/pages/queries-aggregations/pagination/offset-based.adoc

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ You would fetch the first "page" of 10 by executing:
1818
[source, graphql, indent=0]
1919
----
2020
query {
21-
users(options: {
22-
limit: 10
23-
}) {
21+
users(limit: 10) {
2422
name
2523
}
2624
}
@@ -33,10 +31,7 @@ And then on subsequent calls, introduce the `offset` argument and increment it b
3331
[source, graphql, indent=0]
3432
----
3533
query {
36-
users(options: {
37-
offset: 10
38-
limit: 10
39-
}) {
34+
users(offset: 10, limit: 10) {
4035
name
4136
}
4237
}
@@ -47,10 +42,7 @@ query {
4742
[source, graphql, indent=0]
4843
----
4944
query {
50-
users(options: {
51-
offset: 20
52-
limit: 10
53-
}) {
45+
users(offset: 20, limit: 10) {
5446
name
5547
}
5648
}
@@ -75,10 +67,7 @@ query {
7567
name_EQ: "Billy"
7668
}) {
7769
name
78-
posts(options: {
79-
offset: 20
80-
limit: 10
81-
}) {
70+
posts(offset: 20, limit: 10) {
8271
content
8372
}
8473
}

modules/ROOT/pages/queries-aggregations/queries.adoc

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ For which the following query fields are generated:
3333
[source, graphql, indent=0]
3434
----
3535
type Query {
36-
posts(where: PostWhere, options: PostOptions): [Post!]!
36+
posts(where: PostWhere, sort: [PostSort!]!, limit: Int, offset: Int,): [Post!]!
3737
postsAggregate(where: PostWhere): PostAggregationSelection!
3838
39-
users(where: UserWhere, options: UserOptions): [User!]!
39+
users(where: UserWhere, sort: [UserSort!]!, limit: Int, offset: Int,): [User!]!
4040
usersAggregate(where: UserWhere): UserAggregationSelection!
4141
}
4242
----
@@ -69,45 +69,3 @@ query {
6969
}
7070
}
7171
----
72-
73-
== Undirected queries
74-
75-
All xref::/types/relationships.adoc[relationships] are created with a direction from one node to another.
76-
By default, all queries follow the direction defined in the relationship.
77-
However, in some cases it is necessary to query for all related nodes, regardless of the direction of the relationship.
78-
This can be achieved with the argument `directed: false`.
79-
80-
For example, the following query should return all User friends, regardless of the direction of the relationship `"FRIENDS_WITH"`:
81-
82-
[source, graphql, indent=0]
83-
----
84-
query {
85-
users {
86-
name
87-
friends: friends(directed: false) {
88-
name
89-
}
90-
}
91-
}
92-
----
93-
94-
In addition, undirected relationships can also be used in the same fashion with connections.
95-
For instance, this query is asking for a list of users and their friends' names with an undirected friendship connection:
96-
97-
[source, graphql, indent=0]
98-
----
99-
query Query {
100-
users {
101-
friendsConnection(directed: false) {
102-
edges {
103-
node {
104-
name
105-
}
106-
}
107-
}
108-
}
109-
}
110-
----
111-
112-
Keep in mind that *undirected relationships are only supported in queries*.
113-
The xref::/types/relationships.adoc#_querydirection[type definitions] for a relationship may define a different behavior, so the `directed` option may not be available in some cases.

modules/ROOT/pages/queries-aggregations/sorting.adoc

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,8 @@ input MovieSort {
3535
runtime: SortDirection
3636
}
3737
38-
input MovieOptions {
39-
"""Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array."""
40-
sort: [MovieSort!]
41-
limit: Int
42-
offset: Int
43-
}
44-
4538
type Query {
46-
movies(where: MovieWhere, options: MovieOptions): [Movie!]!
39+
movies(where: MovieWhere, sort: [MovieSort!], limit: Int, offset: Int): [Movie!]!
4740
}
4841
----
4942

@@ -52,13 +45,12 @@ The following query fetches all movies sorted by runtime in ascending order:
5245
[source, graphql, indent=0]
5346
----
5447
query {
55-
movies(options: {
56-
sort: [
48+
movies(sort: [
5749
{
5850
runtime: ASC
5951
}
6052
]
61-
}) {
53+
) {
6254
title
6355
runtime
6456
}
@@ -73,13 +65,12 @@ query {
7365
movies {
7466
title
7567
runtime
76-
actors(options: {
77-
sort: [
68+
actors(sort: [
7869
{
7970
surname: ASC
8071
}
8172
]
82-
}) {
73+
) {
8374
surname
8475
}
8576
}

0 commit comments

Comments
 (0)