T - domain typeR - result typepublic static class QueryByExampleDataFetcher.Builder<T,R>
extends java.lang.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 |
|---|---|
graphql.schema.DataFetcher<java.lang.Iterable<R>> |
many()
Build a
DataFetcher to fetch many object instances. |
<P> QueryByExampleDataFetcher.Builder<T,P> |
projectAs(java.lang.Class<P> projectionType)
Project results returned from the
QueryByExampleExecutor
into the target projectionType. |
graphql.schema.DataFetcher<R> |
single()
Build a
DataFetcher to fetch single object instances. |
QueryByExampleDataFetcher.Builder<T,R> |
sortBy(org.springframework.data.domain.Sort sort)
Apply a
Sort order. |
public <P> QueryByExampleDataFetcher.Builder<T,P> projectAs(java.lang.Class<P> projectionType)
QueryByExampleExecutor
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 typeQueryByExampleDataFetcher.Builder instance with all previously
configured options and projectionType appliedpublic QueryByExampleDataFetcher.Builder<T,R> sortBy(org.springframework.data.domain.Sort sort)
Sort order.sort - the default sort orderQueryByExampleDataFetcher.Builder instance with all previously configured
options and Sort appliedpublic graphql.schema.DataFetcher<R> single()
DataFetcher to fetch single object instances.public graphql.schema.DataFetcher<java.lang.Iterable<R>> many()
DataFetcher to fetch many object instances.