Package graphql.annotations.connection
Class PaginatedDataConnectionFetcher<T>
- java.lang.Object
-
- graphql.annotations.connection.PaginatedDataConnectionFetcher<T>
-
- Type Parameters:
T- the entity type that is paginated
- All Implemented Interfaces:
ConnectionFetcher<T>,graphql.schema.DataFetcher<graphql.relay.Connection<T>>
public class PaginatedDataConnectionFetcher<T> extends java.lang.Object implements ConnectionFetcher<T>
Use this class inGraphQLConnectionto do a real pagination, i.e you fetch each time the relevant data, you make the cursors and you decide if there are previous or next pagesNote: If you are using the connection, the return type of the associated dataFetcher must implement
PaginatedData
-
-
Constructor Summary
Constructors Constructor Description PaginatedDataConnectionFetcher(graphql.schema.DataFetcher<PaginatedData<T>> paginationDataFetcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description graphql.relay.Connection<T>get(graphql.schema.DataFetchingEnvironment environment)
-
-
-
Constructor Detail
-
PaginatedDataConnectionFetcher
public PaginatedDataConnectionFetcher(graphql.schema.DataFetcher<PaginatedData<T>> paginationDataFetcher)
-
-