From 941806318e8b042058ee8c7ab4a9e65db90d25e5 Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 6 Sep 2023 15:56:07 +0700 Subject: [PATCH] Default response content type using GraphQL spec Default response content type header should conform to [GraphQL over HTTP spec](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#serialization-format). (cherry picked from commit bff1fb7c2dab439245a9cf01619155e0c2ae7b8e) --- .../graphql/runtime/SmallRyeGraphQLExecutionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java b/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java index dd39c64ce82bf..bb7618eaefc5d 100644 --- a/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java +++ b/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java @@ -46,7 +46,7 @@ public class SmallRyeGraphQLExecutionHandler extends SmallRyeGraphQLAbstractHand private static final String EXTENSIONS = "extensions"; private static final String APPLICATION_GRAPHQL = "application/graphql"; private static final String OK = "OK"; - private static final String DEFAULT_RESPONSE_CONTENT_TYPE = "application/graphql+json; charset=" + private static final String DEFAULT_RESPONSE_CONTENT_TYPE = "application/graphql-response+json; charset=" + StandardCharsets.UTF_8.name(); private static final String DEFAULT_REQUEST_CONTENT_TYPE = "application/json; charset=" + StandardCharsets.UTF_8.name();