@@ -668,7 +668,7 @@ GraphQlSource.schemaResourceBuilder()
668
668
<1> Create type visitor with one or more ``ConnectionAdapter``s.
669
669
<2> Resister the type visitor.
670
670
671
- There are <<data.scroll.sort ,built-in>> ``ConnectionAdapter``s for Spring Data's
671
+ There are <<data.pagination.scroll ,built-in>> ``ConnectionAdapter``s for Spring Data's
672
672
`Window` and `Slice`. You can also create your own custom adapter. `ConnectionAdapter`
673
673
implementations rely on a <<execution.pagination.cursor.strategy>> to
674
674
create cursors for returned items. The same strategy is also used to support the
@@ -692,28 +692,19 @@ ensure that annotated controllers are <<controllers-declaration, configured>> fo
692
692
them opaque to clients. `EncodingCursorStrategy` combines `CursorStrategy` with a
693
693
`CursorEncoder`. You can use `Base64CursorEncoder`, `NoOpEncoder` or create your own.
694
694
695
- There is a <<data.scroll.sort ,built-in>> `CursorStrategy` for the Spring Data
695
+ There is a <<data.pagination.scroll ,built-in>> `CursorStrategy` for the Spring Data
696
696
`ScrollPosition`. The <<boot-starter>> registers a `ScrollPositionCursorStrategy` with
697
697
`Base64Encoder` when Spring Data is present.
698
698
699
699
700
- [[execution.pagination.arguments]]
701
- ==== Arguments
702
-
703
- Controller methods can declare a <<controllers.schema-mapping.subrange>>, or a
704
- `ScrollSubange` method argument when Spring Data is present, for pagination requests.
705
- The argument resolver is added when a <<execution.pagination.cursor.strategy>> bean is
706
- present in Spring configuration.
707
-
708
-
709
700
[[execution.pagination.sort.strategy]]
710
701
==== Sort
711
702
712
703
There is no standard way to provide sort information in a GraphQL request. However,
713
- pagination depends on a stable sort order. You can use a default order or extract, and
714
- keep it as an internal detail, or extract sort details from GraphQL arguments.
704
+ pagination depends on a stable sort order. You can use a default order, or otherwise
705
+ expose input types and extract sort details from GraphQL arguments.
715
706
716
- There is <<data.scroll .sort,built-in>> support for Spring Data's `Sort` as a controller
707
+ There is <<data.pagination .sort,built-in>> support for Spring Data's `Sort` as a controller
717
708
method argument. For this to work, you need to have a `SortStrategy` bean.
718
709
719
710
@@ -1197,15 +1188,16 @@ required fields (or columns) are part of the database query result.
1197
1188
1198
1189
1199
1190
1200
- [[data.scroll.sort ]]
1201
- === Scroll and Sort
1191
+ [[data.pagination.scroll ]]
1192
+ === Scroll
1202
1193
1203
1194
As explained in <<execution.pagination>>, the GraphQL Cursor Connection spec defines a
1204
- mechanism for pagination with the `Connection`, `Edge`, and `PageInfo` schema type , while
1195
+ mechanism for pagination with `Connection`, `Edge`, and `PageInfo` schema types , while
1205
1196
GraphQL Java provides the equivalent Java type representations.
1206
1197
1207
- Spring for GraphQL has built-in ``ConnectionAdapter``s to adapt the Spring Data pagination
1208
- types `Window` and `Slice` transparently. You can configure that as follows:
1198
+ Spring for GraphQL provides built-in ``ConnectionAdapter`` implementations to adapt the
1199
+ Spring Data pagination types `Window` and `Slice` transparently. You can configure that
1200
+ as follows:
1209
1201
1210
1202
[source,java,indent=0,subs="verbatim,quotes"]
1211
1203
----
@@ -1232,13 +1224,22 @@ On the request side, a controller method can declare a
1232
1224
or backward. For this to work, you must declare a <<execution.pagination.cursor.strategy>>
1233
1225
supports `ScrollPosition` as a bean.
1234
1226
1227
+ The <<boot-starter>> declares a `CursorStrategy<ScrollPosition>` bean, and registers the
1228
+ `ConnectionFieldTypeVisitor` as shown above if Spring Data is on the classpath.
1229
+
1230
+
1231
+
1232
+ [[data.pagination.sort]]
1233
+ === Sort
1234
+
1235
1235
Spring for GraphQL defines a `SortStrategy` to create `Sort` from GraphQL arguments.
1236
1236
`AbstractSortStrategy` implements the contract with abstract methods to extract the sort
1237
1237
direction and properties. To enable support for `Sort` as a controller method argument,
1238
1238
you need to declare a `SortStrategy` bean.
1239
1239
1240
1240
1241
1241
1242
+
1242
1243
[[controllers]]
1243
1244
== Annotated Controllers
1244
1245
@@ -1411,12 +1412,12 @@ See <<controllers.schema-mapping.source>>.
1411
1412
| `Subrange` and `ScrollSubrange`
1412
1413
| For access to pagination arguments.
1413
1414
1414
- See <<execution.pagination>>, <<data.scroll.sort >>, <<controllers.schema-mapping.subrange>>.
1415
+ See <<execution.pagination>>, <<data.pagination.scroll >>, <<controllers.schema-mapping.subrange>>.
1415
1416
1416
1417
| `Sort`
1417
1418
| For access to sort details.
1418
1419
1419
- See <<execution.pagination>>, <<data.scroll.sort>>, << controllers.schema-mapping.sort>>.
1420
+ See <<execution.pagination>>, <<controllers.schema-mapping.sort>>.
1420
1421
1421
1422
| `DataLoader`
1422
1423
| For access to a `DataLoader` in the `DataLoaderRegistry`.
@@ -1682,7 +1683,7 @@ public class BookController {
1682
1683
[[controllers.schema-mapping.sort]]
1683
1684
==== `Sort`
1684
1685
1685
- When there is a <<data.scroll.sort ,SortStrategy>> bean in Spring configuration, controller
1686
+ When there is a <<data.pagination.scroll ,SortStrategy>> bean in Spring configuration, controller
1686
1687
methods support `Sort` as a method argument. For example:
1687
1688
1688
1689
[source,java,indent=0,subs="verbatim,quotes"]
0 commit comments