I have a plain Spring Boot web application that exposes some REST endpoints via @RestController
s using the spring-boot-starter-web
dependency.
This application needs to make calls to a GraphQL API on another server. The way I see recommended online is to use the Spring GraphQL Starter dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-graphql</artifactId>
</dependency>
All working client examples I have found for this starter use Spring WebFlux and it's reactive WebClient to make the actual calls, which conflicts with and interrupts the performance of the Spring Web controllers (it seems that Spring WebFlux and Spring Web are incompatible).
Is there a way to use this Spring Boot GraphQL starter without using WebFlux/WebClient? Is it possible to still use the starter and substitute the WebClient with a plain, synchronous HTTP client? How? If not, what is a good alternative?