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>

public static class QuerydslDataFetcher.ReactiveBuilder<T,R> extends Object
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 Details

    • projectAs

      public <P> QuerydslDataFetcher.ReactiveBuilder<T,P> projectAs(Class<P> projectionType)
      Project results returned from the ReactiveQuerydslPredicateExecutor 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.
      Parameters:
      projectionType - projection type
      Returns:
      a new QuerydslDataFetcher.Builder instance with all previously configured options and projectionType applied
    • sortBy

      public QuerydslDataFetcher.ReactiveBuilder<T,R> sortBy(org.springframework.data.domain.Sort sort)
      Apply a Sort order.
      Parameters:
      sort - the default sort order
      Returns:
      a new QuerydslDataFetcher.Builder instance with all previously configured options and Sort applied
    • customizer

      public QuerydslDataFetcher.ReactiveBuilder<T,R> customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer)
      Apply a 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.

      Parameters:
      customizer - to customize the GraphQL query to Querydsl Predicate binding with
      Returns:
      a new QuerydslDataFetcher.Builder instance with all previously configured options and QuerydslBinderCustomizer applied
    • single

      public DataFetcher<reactor.core.publisher.Mono<R>> single()
      Build a DataFetcher to fetch single object instances}.
    • many

      public DataFetcher<reactor.core.publisher.Flux<R>> many()
      Build a DataFetcher to fetch many object instances.