1
1
/*
2
- * Copyright 2002-2024 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -48,9 +48,8 @@ final class HttpGraphQlTransport implements GraphQlTransport {
48
48
private static final ParameterizedTypeReference <ServerSentEvent <Map <String , Object >>> SSE_TYPE =
49
49
new ParameterizedTypeReference <ServerSentEvent <Map <String , Object >>>() { };
50
50
51
- // To be removed in favor of Framework's MediaType.APPLICATION_GRAPHQL_RESPONSE
52
- private static final MediaType APPLICATION_GRAPHQL_RESPONSE =
53
- new MediaType ("application" , "graphql-response+json" );
51
+ private static final MediaType APPLICATION_GRAPHQL =
52
+ new MediaType ("application" , "graphql+json" );
54
53
55
54
56
55
private final WebClient webClient ;
@@ -73,11 +72,10 @@ private static MediaType initContentType(WebClient webClient) {
73
72
74
73
75
74
@ Override
76
- @ SuppressWarnings ("removal" )
77
75
public Mono <GraphQlResponse > execute (GraphQlRequest request ) {
78
76
return this .webClient .post ()
79
77
.contentType (this .contentType )
80
- .accept (MediaType .APPLICATION_JSON , APPLICATION_GRAPHQL_RESPONSE , MediaType . APPLICATION_GRAPHQL )
78
+ .accept (MediaType .APPLICATION_JSON , MediaType . APPLICATION_GRAPHQL_RESPONSE , APPLICATION_GRAPHQL )
81
79
.bodyValue (request .toMap ())
82
80
.attributes ((attributes ) -> {
83
81
if (request instanceof ClientGraphQlRequest clientRequest ) {
0 commit comments