From 363f45cd677c80bb171a846d827bdd7aa6f357e1 Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Fri, 6 Oct 2023 09:14:32 +0200 Subject: [PATCH] Accept requests that ask for application/graphql-response+json (cherry picked from commit 5550b704611ae29f4993682b2bcad8d497f6d5a0) --- .../graphql/runtime/SmallRyeGraphQLExecutionHandler.java | 3 ++- 1 file changed, 2 insertions(+), 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 bb7618eaefc5d..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 @@ -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"); }