File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
clients/graphql-kotlin-spring-client/src/main/kotlin/com/expediagroup/graphql/client Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import kotlinx.coroutines.reactive.awaitSingle
2525import org.springframework.http.MediaType
2626import org.springframework.http.codec.json.Jackson2JsonDecoder
2727import org.springframework.http.codec.json.Jackson2JsonEncoder
28- import org.springframework.web.reactive.function.client.ExchangeStrategies
2928import org.springframework.web.reactive.function.client.WebClient
3029
3130/* *
@@ -42,16 +41,13 @@ open class GraphQLWebClient(
4241 init {
4342 mapper.enable(DeserializationFeature .READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE )
4443
45- val strategies = ExchangeStrategies
46- .builder()
47- .codecs { configurer ->
48- configurer.defaultCodecs().jackson2JsonEncoder(Jackson2JsonEncoder (mapper, MediaType .APPLICATION_JSON ))
49- configurer.defaultCodecs().jackson2JsonDecoder(Jackson2JsonDecoder (mapper, MediaType .APPLICATION_JSON ))
50- }.build()
51- builder.exchangeStrategies(strategies)
44+ builder.codecs { codecConfigurer ->
45+ codecConfigurer.defaultCodecs().jackson2JsonEncoder(Jackson2JsonEncoder (mapper, MediaType .APPLICATION_JSON ))
46+ codecConfigurer.defaultCodecs().jackson2JsonDecoder(Jackson2JsonDecoder (mapper, MediaType .APPLICATION_JSON ))
47+ }
5248 }
5349
54- private val client = builder.baseUrl(url).build()
50+ private val client: WebClient = builder.baseUrl(url).build()
5551
5652 /* *
5753 * Executes specified GraphQL query or mutation.
You can’t perform that action at this time.
0 commit comments