Class QuerydslDataFetcher.ReactiveBuilder<T,R> 
java.lang.Object
org.springframework.graphql.data.query.QuerydslDataFetcher.ReactiveBuilder<T,R> 
- Type Parameters:
- T- domain type
- R- 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.- Since:
- 1.0.0
- Author:
- Mark Paluch, Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescriptioncursorStrategy(CursorStrategy<org.springframework.data.domain.ScrollPosition> cursorStrategy) Configure strategy for decoding a cursor from a paginated request.customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer) Apply aQuerydslBinderCustomizer.defaultScrollSubrange(int defaultCount, Function<Boolean, org.springframework.data.domain.ScrollPosition> defaultPosition) Configure a default scroll count to use, and function to return a defaultScrollPositionfor forward vs backward pagination.defaultScrollSubrange(ScrollSubrange defaultSubrange) Deprecated, for removal: This API element is subject to removal in a future version.graphql.schema.DataFetcher<reactor.core.publisher.Flux<R>> many()Build aDataFetcherto fetch many object instances.Project results returned from theReactiveQuerydslPredicateExecutorinto the targetprojectionType.Build aDataFetcherthat scrolls and returnsWindow.graphql.schema.DataFetcher<reactor.core.publisher.Mono<R>> single()Build aDataFetcherto fetch single object instances}.sortBy(org.springframework.data.domain.Sort sort) Apply aSortorder.
- 
Method Details- 
projectAsProject 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.- Type Parameters:
- P- projection type
- Parameters:
- projectionType- projection type
- Returns:
- a new QuerydslDataFetcher.Builderinstance with all previously configured options andprojectionTypeapplied
 
- 
cursorStrategypublic QuerydslDataFetcher.ReactiveBuilder<T,R> cursorStrategy(@Nullable CursorStrategy<org.springframework.data.domain.ScrollPosition> cursorStrategy) Configure strategy for decoding a cursor from a paginated request.By default, this is ScrollPositionCursorStrategywithCursorEncoder.base64()encoding.- Parameters:
- cursorStrategy- the strategy to use
- Returns:
- a new QuerydslDataFetcher.Builderinstance with all previously configured options andSortapplied
- Since:
- 1.2.0
 
- 
defaultScrollSubrangepublic QuerydslDataFetcher.ReactiveBuilder<T,R> defaultScrollSubrange(int defaultCount, Function<Boolean, org.springframework.data.domain.ScrollPosition> defaultPosition) Configure a default scroll count to use, and function to return a defaultScrollPositionfor forward vs backward pagination.For offset scrolling, use ScrollPosition.offset()to scroll from the beginning. Currently, it is not possible to go back from the end.For keyset scrolling, use ScrollPosition.keyset()to scroll from the beginning, orKeysetScrollPosition.reverse()the same to go back from the end.By default a count of 20 and ScrollPosition.offset()are used.- Parameters:
- defaultCount- the default element count in the subrange
- defaultPosition- function that returns the default scroll position
- Since:
- 1.2.5
 
- 
defaultScrollSubrange@Deprecated(since="1.2.5", forRemoval=true) public QuerydslDataFetcher.ReactiveBuilder<T,R> defaultScrollSubrange(@Nullable ScrollSubrange defaultSubrange) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofdefaultScrollSubrange(int, Function)Configure aScrollSubrangeto use when a paginated request does not specify a cursor and/or a count of items.By default, this is ScrollPosition.offset()with a count of 20.- Parameters:
- defaultSubrange- the default scroll subrange
- Returns:
- a new QuerydslDataFetcher.Builderinstance
- Since:
- 1.2.0
 
- 
sortByApply aSortorder.- Parameters:
- sort- the default sort order
- Returns:
- a new QuerydslDataFetcher.Builderinstance with all previously configured options andSortapplied
 
- 
customizerpublic 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
 
- 
singleBuild aDataFetcherto fetch single object instances}.
- 
manyBuild aDataFetcherto fetch many object instances.
- 
scrollable
 
- 
defaultScrollSubrange(int, Function)