dgs-examples-webflux
dgs-examples-webflux copied to clipboard
Issue when testing Subscription with DgsReactiveQueryExecutor
I created a simple test to test the Subscription feature, it is similar to this ReviewSubscriptionTest, but I used DgsReactiveQueryExecutor
in my test, the ExecutionResult
always returns null, and throw a NPE.
I also create another test to run the application in an integration environment, used a GraphQLClient
to perform GraphQL query, and use DgsReactiveQueryExecutor
to subscribe the subscription event, and got the same result(returns null in the execute line).
In another example, I tried to use the raw WebFlux WebSocketClient to test the subscription in a WebFlux/Kotlin Coroutines application, and but I got blocking timeout error there. I have explored some codes of DgsReactiveWebSocketHandler
, and the subscription protocol. In my test I have not used the OperationMessage encoding when build the request message there, and used the simple WebSocket TextMessage to build the payload model directly.
Any suggestion here?