From 769358695e98957e95d0b4f7e2c1a347dd3e6046 Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Wed, 10 Jul 2024 10:59:42 +0200 Subject: [PATCH 1/4] SmallRye GraphQL 2.9.0 --- bom/application/pom.xml | 4 ++-- .../graphql/deployment/SmallRyeGraphQLProcessor.java | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index d5befe87004f0..9ec8b6b2d31b7 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -38,7 +38,7 @@ 1.12.5 2.1.12 0.22.0 - 21.3 + 22.1 3.1 4.0.1 4.0.1 @@ -55,7 +55,7 @@ 4.1.0 4.0.0 3.10.0 - 2.8.6 + 2.9.0 6.3.0 4.5.3 2.1.2 diff --git a/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java b/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java index c831f5f6ffd9f..1506dd8f0ee34 100644 --- a/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java +++ b/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java @@ -53,6 +53,7 @@ import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassConditionBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.deployment.metrics.MetricsCapabilityBuildItem; import io.quarkus.maven.dependency.GACT; @@ -241,6 +242,11 @@ void registerNativeResourceBundle(BuildProducer runtimeInitializedClasses) { + runtimeInitializedClasses.produce(new RuntimeInitializedClassBuildItem("graphql.util.IdGenerator")); + } + @BuildStep SmallRyeGraphQLModifiedClasesBuildItem createIndex(TransformedClassesBuildItem transformedClassesBuildItem) { Map modifiedClasses = new HashMap<>(); From a010cbd7d29061d9e53b2121556461c8203245aa Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Thu, 11 Jul 2024 09:44:37 +0300 Subject: [PATCH 2/4] Properly close AsyncFile in Quarkus REST Fixes: #41811 --- .../serializers/ServerMutinyAsyncFileMessageBodyWriter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/serializers/ServerMutinyAsyncFileMessageBodyWriter.java b/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/serializers/ServerMutinyAsyncFileMessageBodyWriter.java index 2262c937af40e..ec06ca2cc35bd 100644 --- a/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/serializers/ServerMutinyAsyncFileMessageBodyWriter.java +++ b/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/serializers/ServerMutinyAsyncFileMessageBodyWriter.java @@ -65,7 +65,9 @@ public void writeResponse(AsyncFile file, Type genericType, ServerRequestContext file.endHandler(new Runnable() { @Override public void run() { - file.close(); + // we don't need to wait for the file to be closed, we just need to make sure it does get closed + //noinspection ResultOfMethodCallIgnored + file.close().subscribeAsCompletionStage(); response.end(); // Not sure if I need to resume, actually ctx.resume(); From 066ef6ab860779506682cf37fcb56382bf12650f Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Thu, 11 Jul 2024 08:56:21 +0200 Subject: [PATCH 3/4] Some adjustments to GraphQL TCKs --- .../src/main/resources/overrides/basicScalarTests.csv | 3 +++ .../main/resources/overrides/importantDatesUS/output.json | 5 +++++ .../src/main/resources/overrides/trackLongLat/output.json | 5 +++++ 3 files changed, 13 insertions(+) create mode 100644 tcks/microprofile-graphql/src/main/resources/overrides/basicScalarTests.csv create mode 100644 tcks/microprofile-graphql/src/main/resources/overrides/importantDatesUS/output.json create mode 100644 tcks/microprofile-graphql/src/main/resources/overrides/trackLongLat/output.json diff --git a/tcks/microprofile-graphql/src/main/resources/overrides/basicScalarTests.csv b/tcks/microprofile-graphql/src/main/resources/overrides/basicScalarTests.csv new file mode 100644 index 0000000000000..5f2526d80fc25 --- /dev/null +++ b/tcks/microprofile-graphql/src/main/resources/overrides/basicScalarTests.csv @@ -0,0 +1,3 @@ +# Basic Scalar Types +23| type ScalarHolder | charArray: [String!] | Expecting a String Array Scalar (for Java Char[]) Type in type ScalarHolder +47| type Query | testCharArray: [String!] | Expecting a non null Stirng Array (for Java Char[]) Scalar Type in type Query \ No newline at end of file diff --git a/tcks/microprofile-graphql/src/main/resources/overrides/importantDatesUS/output.json b/tcks/microprofile-graphql/src/main/resources/overrides/importantDatesUS/output.json new file mode 100644 index 0000000000000..43170576feaa0 --- /dev/null +++ b/tcks/microprofile-graphql/src/main/resources/overrides/importantDatesUS/output.json @@ -0,0 +1,5 @@ +{ + "data": { + "importantDatesUS": null + } +} \ No newline at end of file diff --git a/tcks/microprofile-graphql/src/main/resources/overrides/trackLongLat/output.json b/tcks/microprofile-graphql/src/main/resources/overrides/trackLongLat/output.json new file mode 100644 index 0000000000000..7bb698a75f141 --- /dev/null +++ b/tcks/microprofile-graphql/src/main/resources/overrides/trackLongLat/output.json @@ -0,0 +1,5 @@ +{ + "data": { + "trackHeroLongLat": null + } +} \ No newline at end of file From 356bf552b116e238f420f6921898ce3c0f49bd07 Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Thu, 11 Jul 2024 15:00:01 +0200 Subject: [PATCH 4/4] Initialize graphql.util.IdGenerator at runtime --- .../vertx/graphql/deployment/VertxGraphqlProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/vertx-graphql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlProcessor.java b/extensions/vertx-graphql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlProcessor.java index 4a33ea01ca16f..98619e8703088 100644 --- a/extensions/vertx-graphql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlProcessor.java +++ b/extensions/vertx-graphql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlProcessor.java @@ -103,4 +103,9 @@ void registerVertxGraphqlUI(VertxGraphqlRecorder recorder, VertxGraphqlConfig co private static boolean doNotIncludeVertxGraphqlUi(LaunchModeBuildItem launchMode, VertxGraphqlConfig config) { return !launchMode.getLaunchMode().isDevOrTest() && !config.ui.alwaysInclude; } + + @BuildStep + void runtimeInitializedClasses(BuildProducer runtimeInitializedClasses) { + runtimeInitializedClasses.produce(new RuntimeInitializedClassBuildItem("graphql.util.IdGenerator")); + } }