Class QuerydslDataFetcher.ReactiveBuilder<T,R>
java.lang.Object
org.springframework.graphql.data.query.QuerydslDataFetcher.ReactiveBuilder<T,R>
- Type Parameters:
T- domain typeR- result type
- Enclosing class:
- QuerydslDataFetcher<T>
Builder for a reactive Querydsl-based
DataFetcher. Note that builder
instances are immutable and return a new instance of the builder when
calling configuration methods.-
Method Summary
Modifier and TypeMethodDescriptioncustomizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer) Apply aQuerydslBinderCustomizer.DataFetcher<reactor.core.publisher.Flux<R>>many()Build aDataFetcherto fetch many object instances.Project results returned from theReactiveQuerydslPredicateExecutorinto the targetprojectionType.DataFetcher<reactor.core.publisher.Mono<R>>single()Build aDataFetcherto fetch single object instances}.sortBy(org.springframework.data.domain.Sort sort) Apply aSortorder.
-
Method Details
-
projectAs
Project results returned from theReactiveQuerydslPredicateExecutorinto the targetprojectionType. Projection types can be either interfaces with property getters to expose or regular classes outside the entity type hierarchy for DTO projections.- Parameters:
projectionType- projection type- Returns:
- a new
QuerydslDataFetcher.Builderinstance with all previously configured options andprojectionTypeapplied
-
sortBy
Apply aSortorder.- Parameters:
sort- the default sort order- Returns:
- a new
QuerydslDataFetcher.Builderinstance with all previously configured options andSortapplied
-
customizer
public QuerydslDataFetcher.ReactiveBuilder<T,R> customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer) Apply aQuerydslBinderCustomizer.If a Querydsl repository implements
QuerydslBinderCustomizeritself, this is automatically detected and applied duringauto-registration. For manual registration, you will need to use this method to apply it.- Parameters:
customizer- to customize the GraphQL query to Querydsl Predicate binding with- Returns:
- a new
QuerydslDataFetcher.Builderinstance with all previously configured options andQuerydslBinderCustomizerapplied
-
single
Build aDataFetcherto fetch single object instances}. -
many
Build aDataFetcherto fetch many object instances.
-