Looking for converting Flux to List<Object>
. Getting error if I use block(). So, need to conver without blocking calls.
Flux.from(Collection.find())
Using reactive programming, but graphql expects List<objects>
and erroring with returning Flux.
Code with Block()
public List<Test> findAll() {
return Flux.from(testCollection.find()).collectList().block();
}
Error :-
block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-kqueue-7
Here, I need to return List<Test>
as I can not send Flux<Test>
for some reason.