From 5f1ca8cda3493c05a9d7d1b6c36769040599b389 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 9 Dec 2022 15:13:12 +0100 Subject: [PATCH] Add reachability metadata for RSocket client Prior to this commit, using the RSocket client in a native image would fail when setting up the codecs, if the chosen transport was WebSocket. This is due to the fact that the `GraphQlWebSocketMessage` type was not registered for reflection and the proper codec could not be detected as a result. This commit adds reflection metadata for this type. Fixes gh-574 --- .../spring-graphql/reflect-config.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 fab40865..98b48667 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,16 @@ "allDeclaredMethods":true, "allDeclaredConstructors":true, "condition": { - "typeReachable": "org.springframework.graphql.client.WebSocketGraphQlTransport" + "typeReachable": "org.springframework.graphql.client.DefaultRSocketGraphQlClientBuilder" + } + }, + { + "name":"org.springframework.graphql.server.support.GraphQlWebSocketMessage", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true, + "condition": { + "typeReachable": "org.springframework.graphql.client.DefaultWebSocketGraphQlClientBuilder" } } ]