Refactor MapGraphQlResponse

MapGraphQlResponse is a simple wrapper around the response map exposing
it as GraphQlResponse. It is now package private and made accessible
through a static factory method on GraphQlTransport.

See gh-10
This commit is contained in:
rstoyanchev
2022-03-17 19:56:31 +00:00
parent 3c30376cba
commit 96135183f5
10 changed files with 34 additions and 54 deletions

View File

@@ -26,7 +26,6 @@ import org.springframework.core.ParameterizedTypeReference;
import org.springframework.graphql.GraphQlRequest;
import org.springframework.graphql.GraphQlResponse;
import org.springframework.graphql.client.GraphQlTransport;
import org.springframework.graphql.support.MapGraphQlResponse;
import org.springframework.http.MediaType;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.util.Assert;
@@ -67,7 +66,7 @@ final class WebTestClientTransport implements GraphQlTransport {
.getResponseBody();
responseMap = (responseMap != null ? responseMap : Collections.emptyMap());
GraphQlResponse response = MapGraphQlResponse.forResponse(responseMap);
GraphQlResponse response = GraphQlTransport.wrapResponseMap(responseMap);
return Mono.just(response);
}