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
  • Loading branch information
mkouba committed Aug 4, 2023
1 parent 6e65c47 commit 2be7e95
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,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 @@ -370,7 +372,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 2be7e95

Please sign in to comment.