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
This commit is contained in:
Brian Clozel
2023-10-13 23:13:30 +02:00
parent 432c51740d
commit cb2f4b2db5

View File

@@ -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"
}
}
]