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 3, 2023
1 parent f55273b commit dc4907f
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 dc4907f

Please sign in to comment.