You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,11 +231,15 @@ Relay [specification for mutations](https://facebook.github.io/relay/graphql/mut
231
231
232
232
You can use `@GraphQLConnection` annotation to make a field iterable in adherence to Relay [Connection specification](https://facebook.github.io/relay/graphql/connections.htm).\
233
233
If a field is annotated with the annotation, the associated dataFetcher must return an instance of `PaginatedData`.\
234
-
The `PaginatedData` class holds the result of the conneciton:
234
+
The `PaginatedData` class holds the result of the connection:
235
235
1. The data of the page
236
236
2. Whether or not there is a next page and a previous page
237
237
3. A method that returns for each entity the encoded cursor of the entity (it returns string)
238
238
239
+
If you want to use you own implementation of connection, that's fine, just give a value to connection().\
240
+
Please note that if you do so, you also have to specify your own connection validator that implements `ConnectionValidator`\
241
+
(and should throw `@GraphQLConnectionException` if something is wrong)
242
+
239
243
NOTE: because `PropertyDataFetcher` and `FieldDataFetcher` can't handle connection, this annotation cant be used on a field that doesn't have a dataFetcher
0 commit comments