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..d0ffbc1901c95 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(); @@ -295,8 +295,9 @@ private static String getCharset(String mimeType) { } private boolean isValidAcceptRequest(String mimeType) { - // At this point we only accept two return mimeType.startsWith("application/json") + || mimeType.startsWith("application/graphql-response+json") + // application/graphql+json is incorrect, but we keep it for backwards compatibility || mimeType.startsWith("application/graphql+json"); }