graphql-spring-webclient icon indicating copy to clipboard operation
graphql-spring-webclient copied to clipboard

Provide a way to override request Url

Open lukasjapan opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. When having a customized WebClient bean that sets its own baseUrl, all requests go to that URL instead of graphql.client.url because setup is omitted. There is no way to override url. (Is there?)

Ref: https://github.com/graphql-java-kickstart/graphql-spring-webclient/blob/17ffcc8a7f8dad8daf077add5eef5134a83f6fe0/graphql-webclient-spring-boot-autoconfigure/src/main/java/graphql/kickstart/spring/webclient/boot/GraphQLWebClientAutoConfiguration.java#L35

Describe the solution you'd like

provide a way to set the url on a per request basis in the request builder

or

graphql-spring-webclient sets .uri() based on the config value for each request.

-> https://github.com/graphql-java-kickstart/graphql-spring-webclient/blob/17ffcc8a7f8dad8daf077add5eef5134a83f6fe0/graphql-webclient/src/main/java/graphql/kickstart/spring/webclient/boot/GraphQLWebClientImpl.java#L35

or both

Describe alternatives you've considered

Multiple WebClient Beans + manually wiring the correct one to GraphQLWebClient but its too technical

Additional context

lukasjapan avatar Mar 03 '22 08:03 lukasjapan