Skip to content

Commit

Permalink
SmallRyeGraphQLOverWebSocketHandler: use order value > Integer.MIN_VALUE
Browse files Browse the repository at this point in the history
- so that it's possible to register a route/filter that is executed
before this handler
- fixes quarkusio#34908

(cherry picked from commit 2be7e95)
  • Loading branch information
mkouba authored and gsmet committed Aug 9, 2023
1 parent d2f3837 commit 9b83a7c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ public class SmallRyeGraphQLProcessor {
private static final List<String> SUPPORTED_WEBSOCKET_SUBPROTOCOLS = List.of(SUBPROTOCOL_GRAPHQL_WS,
SUBPROTOCOL_GRAPHQL_TRANSPORT_WS);

private static final int GRAPHQL_WEBSOCKET_HANDLER_ORDER = -10000;

@BuildStep
void feature(BuildProducer<FeatureBuildItem> featureProducer) {
featureProducer.produce(new FeatureBuildItem(Feature.SMALLRYE_GRAPHQL));
Expand Down Expand Up @@ -368,7 +370,7 @@ void buildExecutionEndpoint(
runBlocking);

HttpRootPathBuildItem.Builder subscriptionsBuilder = httpRootPathBuildItem.routeBuilder()
.orderedRoute(graphQLConfig.rootPath, Integer.MIN_VALUE)
.orderedRoute(graphQLConfig.rootPath, GRAPHQL_WEBSOCKET_HANDLER_ORDER)
.handler(graphqlOverWebsocketHandler);
routeProducer.produce(subscriptionsBuilder.build());

Expand Down

0 comments on commit 9b83a7c

Please sign in to comment.