Spring graphql GraphQlWebSocketHandler returns type as enum name in upper case but graphql-ws client expects type to be in lower case
I am using spring-boot-starter-graphql 3.3.2 along with Java 21 and implemented Graphql subscriptions.
Step 1: Connecting to websocket using “ws://localhost:7030/subscriptions”
Step 2: Initiating connection by send payload –
{“type”:”connection_init”,”payload”:{“token”:”Bearer eyJhbGciO……”}}
Step 3: Got response
{
“id”: null,
“type”: “CONNECTION_ACK”,
“payload”: {}
}
Problem here is I am using grapqhl-ws library on client side and it expects json response type to be in lower case like “type”: “connection_ack”,
Read more here: Source link

