From cb2f4b2db5210a356ea0e564a01344a40151d1aa Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 13 Oct 2023 23:13:30 +0200 Subject: [PATCH] Fix GraalVM reflection metadata for GraphQL client Prior to this commit, the embedded reachability metadata for GraalVM would declare a reflection hint for `GraphQlWebSocketMessage` when the RSocket or WebSocket clients are reachable. The `CodecDelegate` relies on this message class to test codecs and detect a JSON-capable instance. This is true for all supported GraphQlClient implementations. This commit revisits the embedded reachability metadata to: * allow reflection on `GraphQlWebSocketMessage` if any client extending `AbstractGraphQlClientBuilder` is available * allow reflection on `GraphQlWebSocketMessage` if a `GraphQlWebSocketHandler` is reachable Fixes gh-837 --- .../spring-graphql/reflect-config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-graphql/src/main/resources/META-INF/native-image/org.springframework.graphql/spring-graphql/reflect-config.json b/spring-graphql/src/main/resources/META-INF/native-image/org.springframework.graphql/spring-graphql/reflect-config.json index 98b48667..b1d729bd 100644 --- a/spring-graphql/src/main/resources/META-INF/native-image/org.springframework.graphql/spring-graphql/reflect-config.json +++ b/spring-graphql/src/main/resources/META-INF/native-image/org.springframework.graphql/spring-graphql/reflect-config.json @@ -5,7 +5,7 @@ "allDeclaredMethods":true, "allDeclaredConstructors":true, "condition": { - "typeReachable": "org.springframework.graphql.client.DefaultRSocketGraphQlClientBuilder" + "typeReachable": "org.springframework.graphql.client.AbstractGraphQlClientBuilder" } }, { @@ -14,7 +14,7 @@ "allDeclaredMethods":true, "allDeclaredConstructors":true, "condition": { - "typeReachable": "org.springframework.graphql.client.DefaultWebSocketGraphQlClientBuilder" + "typeReachable": "org.springframework.graphql.server.webflux.GraphQlWebSocketHandler" } } ]