graphql-java-servlet
graphql-java-servlet copied to clipboard
Support of graphql-transport-ws GraphQL subscription protocol
Hello!
Are there plans to implement graphql-transport-ws GraphQL subscription protocol?
The existing graphql-ws
protocol is no longer maintained and even not supported in some products (for example, Tyk Gateway).
Definitely, not sure yet when we'll be able to have it ready though.
Any update on when graphql-transport-ws will be supported?
Are there major changes required to support the sub-protocol? Or is it possible to just override method (possibly modifyHandshake) in GraphQLWebsocketServlet
in the meantime, @oliemansm ?
The existing graphql-ws protocol has been unmaintained for ~5 years. So we're concerned about moving forward without a workaround.
@oliemansm Do you start working for the temporary fix as @sgrannan proposed or you are starting to implement the graphql-transport-ws specs?
If it is the former one I can start (in my free time) to work on it
I've started to work on the actual implementation. Hope to make some good progress and be able to merge early next week. Will keep you posted.
There is a rather "slim" implementation of the graphql-transport-ws
protocol in Kotlin...
https://github.com/Netflix/dgs-framework/blob/master/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandler.kt
@oliemansm do you have some news? wdyt of making it work with annotated @ServerEndpoint
classes?
Like this...
@ServerEndpoint(value = "/graphql", subprotocols = "graphql-transport-ws")
public class MyGraphlWs extends BaseGraphQLTransportWs {
@Inject private GraphQLConfiguration configuration;
@OnOpen
public void onOpen(Session session, EndpointConfig endpointConfig) {
super.onOpen(session, endpointConfig);
}
@OnMessage // call super.onMessage
@OnClose // call super.onClose
@OnError // call super.onError
}
Hi, is there any update or ETA on this? Thanks :)
@oliemansm May I ask if there's any update on this? Thank you so much!!!
Any update on this @oliemansm ?
Hate to be that guy but could we get an update? @oliemansm
The library we use for the current protocol is heavily outdated and we are looking to move to graphql-transport-ws protocol.
@ItsNoHax the maintainers have given up on this project as a whole unfortunately. It is scrapped in favor or letting the Spring team take the lead on GQL implementations.
So my team moved over to spring-graphql
and it was painful at first but mostly just for graphql subscriptions and the re-writing of unit tests. Took me about 2 weeks. I am not a fan of how opinionated the Spring GQL folks are in terms of negating some Spring Conventions / Mantras, but it works and is being improved.