graphql-java-kickstart/graphql-spring-webclient

GraphQLWebClient does not pick up configuration properties when spring-boot-starter-hateoas is present

rnferreira opened this issue · 2 comments

Description
The injected WebClient in the GraphQLWebClient will not have the baseUrl property set if another class creates a WebClient bean (e.g. Spring Boot HATEOAS AutoConfiguration class). This prevents its usage as described in the README and forces the developer to manually create the aforementioned bean.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a simple project that uses org.springframework.boot:spring-boot-starter-hateoas and com.graphql-java-kickstart:graphql-webclient-spring-boot-starter (v1.0.0).
  2. Make the necessary adjustments to the application.properties or application.yml.
  3. Put a breakpoint on the GraphQLWebClient bean creation (at the time of this writing, it is line 78).
  4. Run the application in debug mode.
  5. Verify that the injected WebClient has baseUrl=null.

Expected behaviour
GraphQLWebClient works as expected, irrespective of having other frameworks in play.

Desktop:

  • OS: macOS BigSur 11.5
  • Version 1.0.0

Sorry, my mistake. It was a configuration problem due to another dependency and not caused by HATEOAS.

@rnferreira how was this fixed? we have the same problem.