Repository: quarkusio/quarkus
Issue: Extension quarkus-vertx-graphql interferes with extension quarkus-resteasy-multipart

## Describe the bug
After upgrading to Quarks 2.0 I discovered an issue with my application that uses the extensions quarkus-vertx-graphql and quarkus-resteasy-multipart. While running my application in devmode if I perform a multipart form data post to a JAX-RS endpoint none of the parts are received by the JAX-RS endpoint. If i remove the quarkus-vertx-graphql dependency from my application it works fine. The application also works fine in production mode when I directly run the quarkus-run.jar.


### Expected behavior
The multipart form parameter parts are available regardless of what mode the Quarkus application is run in or if the quarkus-vertx-graphql extensions is included in the application. 

### Actual behavior
The request reaches the endpoint but no parts are available.

## To Reproduce

Reproducer: https://github.com/aaronanderson/quarkus-multipart

I experimented with the 2.0.1.Final version of the VertxGraphqlProcessor class and if I comment out this line and build the extension it fixes the issue:

https://github.com/quarkusio/quarkus/blob/9e0736c5091bc34791ceffe6b760f111af0b63bf/extensions/vertx-graphql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlProcessor.java#L84

I am not sure what the RequireBodyHandlerBuildItem does or why it would affect the multipart extension. I did confirm it is required for the vertx-graphql extension to work.

Steps to reproduce the behavior:
1. Check out the reproducer build and run it. 
2. Remove the quarkus-vertx-graphql or modify the VertxGraphqlProcessor class as mentioned above to successfully run the test.


## Environment (please complete the following information):

### Output of `java -version`
```
java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment Corretto-16.0.1.9.1 (build 16.0.1+9)
OpenJDK 64-Bit Server VM Corretto-16.0.1.9.1 (build 16.0.1+9, mixed mode, sharing)
```


### Quarkus version or git rev
2.0.1.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
mvn -version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /home/xxxx/apache-maven-3.8.1
Java version: 16.0.1, vendor: Amazon.com Inc., runtime: /home/xxxx/jdk-16
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.13.0-051300-generic", arch: "amd64", family: "unix"

## Additional context
(Add any other context about the problem here.)


Changed files:
extensions/vertx-graphql/runtime/src/main/java/io/quarkus/vertx/graphql/runtime/VertxGraphqlRecorder.java
extensions/vertx-graphql/deployment/src/main/java/io/quarkus/vertx/graphql/deployment/VertxGraphqlProcessor.java

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 3f19e383ca7..febf834c992 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
@@ -16,8 +16,8 @@
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import io.quarkus.runtime.configuration.ConfigurationException;
 import io.quarkus.vertx.graphql.runtime.VertxGraphqlRecorder;
+import io.quarkus.vertx.http.deployment.BodyHandlerBuildItem;
 import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem;
-import io.quarkus.vertx.http.deployment.RequireBodyHandlerBuildItem;
 import io.quarkus.vertx.http.deployment.RouteBuildItem;
 import io.quarkus.vertx.http.deployment.WebsocketSubProtocolsBuildItem;
 import io.vertx.core.Handler;
@@ -48,13 +48,13 @@ List<ReflectiveClassBuildItem> registerForReflection() {
     }
 
     @BuildStep
-    @Record(ExecutionTime.STATIC_INIT)
+    @Record(ExecutionTime.RUNTIME_INIT)
     void registerVertxGraphqlUI(VertxGraphqlRecorder recorder,
             BuildProducer<NativeImageResourceDirectoryBuildItem> nativeResourcesProducer, VertxGraphqlConfig config,
             LaunchModeBuildItem launchMode,
             NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,
             BuildProducer<RouteBuildItem> routes,
-            BuildProducer<RequireBodyHandlerBuildItem> body) {
+            BodyHandlerBuildItem bodyHandler) {
 
         boolean includeVertxGraphqlUi = launchMode.getLaunchMode().isDevOrTest() || config.ui.alwaysInclude;
         if (!includeVertxGraphqlUi) {
@@ -77,11 +77,9 @@ void registerVertxGraphqlUI(VertxGraphqlRecorder recorder,
                 .build());
         routes.produce(
                 nonApplicationRootPathBuildItem.routeBuilder()
-                        .route(path + "/*")
+                        .routeFunction(path + "/*", recorder.routeFunction(bodyHandler.getHandler()))
                         .handler(handler)
                         .build());
-        // Body handler required in Vert.x 4, to avoid DDOS attack.
-        body.produce(new RequireBodyHandlerBuildItem());
 
         nativeResourcesProducer.produce(new NativeImageResourceDirectoryBuildItem("io/vertx/ext/web/handler/graphiql"));
     }
diff --git a/extensions/vertx-graphql/runtime/src/main/java/io/quarkus/vertx/graphql/runtime/VertxGraphqlRecorder.java b/extensions/vertx-graphql/runtime/src/main/java/io/quarkus/vertx/graphql/runtime/VertxGraphqlRecorder.java
index 1ed8d191ceb..79e2fea1c95 100644
--- a/extensions/vertx-graphql/runtime/src/main/java/io/quarkus/vertx/graphql/runtime/VertxGraphqlRecorder.java
+++ b/extensions/vertx-graphql/runtime/src/main/java/io/quarkus/vertx/graphql/runtime/VertxGraphqlRecorder.java
@@ -1,8 +1,11 @@
 package io.quarkus.vertx.graphql.runtime;
 
+import java.util.function.Consumer;
+
 import io.quarkus.runtime.annotations.Recorder;
 import io.vertx.core.Handler;
 import io.vertx.core.http.HttpHeaders;
+import io.vertx.ext.web.Route;
 import io.vertx.ext.web.RoutingContext;
 import io.vertx.ext.web.handler.graphql.GraphiQLHandler;
 import io.vertx.ext.web.handler.graphql.GraphiQLHandlerOptions;
@@ -32,4 +35,14 @@ public void handle(RoutingContext event) {
             }
         };
     }
+
+    public Consumer<Route> routeFunction(Handler<RoutingContext> bodyHandler) {
+        return new Consumer<Route>() {
+            @Override
+            public void accept(Route route) {
+                route.handler(bodyHandler);
+            }
+        };
+    }
+
 }