Closed rstoyanchev closed 5 months ago
@EntityMapping methods can load entities of a given type in batch mode by returning List<T>, Mono<List<T>>, CompletableFuture<List<T>>, and others. We can also support Flux<T>, and adapt via Flux#collectList.
@EntityMapping
List<T>
Mono<List<T>>
CompletableFuture<List<T>>
Flux<T>
Flux#collectList
Based on https://github.com/spring-projects/spring-graphql/issues/922#issuecomment-2142192587 by @gianielsevier.
@EntityMapping
methods can load entities of a given type in batch mode by returningList<T>
,Mono<List<T>>
,CompletableFuture<List<T>>
, and others. We can also supportFlux<T>
, and adapt viaFlux#collectList
.Based on https://github.com/spring-projects/spring-graphql/issues/922#issuecomment-2142192587 by @gianielsevier.