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-825
This commit is contained in:
Brian Clozel
2023-10-13 23:13:30 +02:00
parent 6c15e0931a
commit 4912588a8a

View File

@@ -12,7 +12,7 @@
"allDeclaredMethods":true,
"allDeclaredConstructors":true,
"condition": {
"typeReachable": "org.springframework.graphql.client.DefaultRSocketGraphQlClientBuilder"
"typeReachable": "org.springframework.graphql.client.AbstractGraphQlClientBuilder"
}
},
{
@@ -21,7 +21,7 @@
"allDeclaredMethods":true,
"allDeclaredConstructors":true,
"condition": {
"typeReachable": "org.springframework.graphql.client.DefaultWebSocketGraphQlClientBuilder"
"typeReachable": "org.springframework.graphql.server.webflux.GraphQlWebSocketHandler"
}
}
]