Skip to content

Commit 2507cfc

Browse files
remove pagination options from examples
1 parent 98604b8 commit 2507cfc

File tree

5 files changed

+18
-38
lines changed

5 files changed

+18
-38
lines changed

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

Lines changed: 5 additions & 5 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
}

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

Lines changed: 2 additions & 2 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
----

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 & 2 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
----

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)