Skip to content

Commit ac20fa0

Browse files
committed
Update readme
1 parent 2b2c521 commit ac20fa0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,17 @@ NOTE: because `PropertyDataFetcher` and `FieldDataFetcher` can't handle connecti
268268
By default, GraphQLAnnotations will use the `graphql.relay.Relay` class to create the Relay specific schema types (Mutations, Connections, Edges, PageInfo, ...).
269269
It is possible to set a custom implementation of the Relay class with `GraphQLAnnotations.setRelay` method. The class should inherit from `graphql.relay.Relay` and
270270
can redefine methods that create Relay types.
271+
272+
It is also possible to specify for every connection which relay do you want to use, by giving a value to the annotation:
273+
`@GraphQLConnection(connectionType = customRelay.class)`. If you do that, please also give values to `connectionFetcher`
274+
and `validator`.
275+
276+
There is also a support for simple paging, without "Nodes" and "Edges". To use it, annotate you connection like that:
277+
`@GraphQLConnection(connectionFetcher = SimplePaginatedDataConnectionFetcher.class, connectionType = SimpleRelay.class, validator = SimplePaginatedDataConnectionTypeValidator.class)`
278+
and the return type must be of type `SimplePaginatedData`.
279+
It has 2 methods:
280+
1. `getTotalCount` - how many elements are there in total
281+
2. `getData` - get the data
282+
283+
For you convenience, there are two classes that you can use: `AbstractSimplePaginatedData` and `SimplePaginatedDataImpl`
284+
For examples, look at the tests

0 commit comments

Comments
 (0)