T - domain typeR - result typepublic static class QuerydslDataFetcher.Builder<T,R> extends Object
DataFetcher. Note that builder
instances are immutable and return a new instance of the builder
when calling configuration methods.| Modifier and Type | Method and Description |
|---|---|
QuerydslDataFetcher.Builder<T,R> |
customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer)
Apply a
QuerydslBinderCustomizer. |
DataFetcher<Iterable<R>> |
many()
Build a
DataFetcher to fetch many object instances. |
<P> QuerydslDataFetcher.Builder<T,P> |
projectAs(Class<P> projectionType)
Project results returned from the
QuerydslPredicateExecutor
into the target projectionType. |
DataFetcher<R> |
single()
Build a
DataFetcher to fetch single object instances. |
QuerydslDataFetcher.Builder<T,R> |
sortBy(org.springframework.data.domain.Sort sort)
Apply a
Sort order. |
public <P> QuerydslDataFetcher.Builder<T,P> projectAs(Class<P> projectionType)
QuerydslPredicateExecutor
into the target projectionType. Projection types can be
either interfaces with property getters to expose or regular classes
outside the entity type hierarchy for DTO projections.projectionType - projection typeQuerydslDataFetcher.Builder instance with all previously
configured options and projectionType appliedpublic QuerydslDataFetcher.Builder<T,R> sortBy(org.springframework.data.domain.Sort sort)
Sort order.sort - the default sort orderQuerydslDataFetcher.Builder instance with all previously configured
options and Sort appliedpublic QuerydslDataFetcher.Builder<T,R> customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer)
QuerydslBinderCustomizer.
If a Querydsl repository implements QuerydslBinderCustomizer
itself, this is automatically detected and applied during
auto-registration.
For manual registration, you will need to use this method to apply it.
customizer - to customize the binding of the GraphQL request to
Querydsl PredicateQuerydslDataFetcher.Builder instance with all previously configured
options and QuerydslBinderCustomizer appliedpublic DataFetcher<R> single()
DataFetcher to fetch single object instances.public DataFetcher<Iterable<R>> many()
DataFetcher to fetch many object instances.