Closed mehdizebhi closed 2 months ago
@mehdizebhi, there are two GraphQL over WebSocket protocols, the old one with subprotocol name "graphql-ws", not maintained since 2018, and its successor with subprotocol name "graphql-transport-ws". You can read about the history of that transition in this blog post.
What AWS is using seems to match the old protocol, but we don't support that. The sub-protocol is actually supposed to be negotiated at WebSocket handshake time, and we do send the name of the sub-protocol, so AWS should be rejecting the handshake, but it's probably not making that checking.
In short, it's not only the KA messages, there are others too that are different. We just don't support the older protocol sequence I'm afraid.
Hi, I recently used the Graphql client in Spring to subscribe to the AppSync Real-Time service. In the AWS documentation, there is a message type called Keep-alive message as { "type": "ka" }; Therefore, when this type of message is received, because there is no enum for this 'ka' in GraphQlWebSocketMessageType, it gives an error and closes the WebSocket connection.
AWS documentation: https://docs.aws.amazon.com/appsync/latest/devguide/real-time-websocket-client.html#keep-alive-message
My Code:
The error I received:
With this error, the connection is closed and the subscription on the reactive source is terminated, and nothing can be done. Is there a solution to support non-existent types?