How to use Spring GraphQL in an existing server
I have an existing application running in a non-Spring application server. I’d like to integrate a GraphQL API into that application using spring-graphql. How would I go about that? My intention was to get a reference to the GraphQlSource to execute queries sent to an HTTP endpoint implemented in this server. In learning about spring-graphql, I went through the tutorial by generating a Spring Boot application using Spring GraphQL and MVC. I also created a component that obtained a reference to the GraphQlSource via auto-wiring and was able to execute GraphQL queries on the server side.
Now, I want to take what I’ve prototyped and integrate that into my existing application server without requiring Spring MVC. I created another Spring Boot project and specified only the Spring GraphQL dependency. However, it looks like the GraphQLSource is never created. The GraphQlSource implementation that is injected into my component is null. How can I cause the required auto configuration to happen without requiring an HTTP transport?
Read more here: Source link
