Rever to "application/json" as default MIME type
As of #108, the `"application/graphql+json"` media type is supported and has been made the default. It seems that it is not ready for adoption now; so while we'll keep supporting it, this commit reverts back to `"application/json"` as the default media type for servers and clients. Closes gh-375
This commit is contained in:
@@ -55,12 +55,12 @@ final class WebTestClientTransport implements GraphQlTransport {
|
||||
public Mono<GraphQlResponse> execute(GraphQlRequest request) {
|
||||
|
||||
Map<String, Object> responseMap = this.webTestClient.post()
|
||||
.contentType(MediaType.APPLICATION_GRAPHQL)
|
||||
.accept(MediaType.APPLICATION_GRAPHQL)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.accept(MediaType.APPLICATION_JSON)
|
||||
.bodyValue(request.toMap())
|
||||
.exchange()
|
||||
.expectStatus().isOk()
|
||||
.expectHeader().contentTypeCompatibleWith(MediaType.APPLICATION_GRAPHQL)
|
||||
.expectHeader().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)
|
||||
.expectBody(MAP_TYPE)
|
||||
.returnResult()
|
||||
.getResponseBody();
|
||||
|
||||
Reference in New Issue
Block a user