From b7de02d9088af5a2920d6acb54de1eebee72ae6f Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Mon, 10 Jan 2022 14:17:31 +0100 Subject: [PATCH] Fix build after Spring GraphQL changes See pring-projects/spring-graphql#229 --- .../graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java | 2 +- .../graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java index 64aadfe805..c3bf38b154 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java @@ -174,7 +174,7 @@ class GraphQlWebFluxAutoConfigurationTests { @Bean WebInterceptor customWebInterceptor() { return (webInput, interceptorChain) -> interceptorChain.next(webInput) - .map((output) -> output.transform((builder) -> builder.responseHeader("X-Custom-Header", "42"))); + .doOnNext((output) -> output.getResponseHeaders().add("X-Custom-Header", "42")); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java index 3e1f57a16a..21b0939cf2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java @@ -185,7 +185,7 @@ class GraphQlWebMvcAutoConfigurationTests { @Bean WebInterceptor customWebInterceptor() { return (webInput, interceptorChain) -> interceptorChain.next(webInput) - .map((output) -> output.transform((builder) -> builder.responseHeader("X-Custom-Header", "42"))); + .doOnNext((output) -> output.getResponseHeaders().add("X-Custom-Header", "42")); } }