You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
I tried to use this library with JS client. All tutorials about it said, that need use "graphql-ws" library for subscriptions. But all worked examples of servers with this library used "subscriptions-transport-ws".
NPM install for this JS-library says
The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.co
m/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
So I have question - I there is a way to switch library WebSocket support to graphql-ws either - do you have plan to support it?
I've added my client. To checking it on your own project, you can change parts of code under //TODO dist.zip
Do you have spring-boot-starter-websocket in your dependencies? In 11.0.0 it would automatically pull in all sorts of spring boot starters, while in 12.0.0 it relies on you to add the proper dependencies. Then the kickstart starter will only enable features depending on things that are on the classpath. Meaning if you do not have a websocket starter on your classpath it will not configure support for subscriptions.
There should be some documentation on the Apollo repo on how to migrate from subscriptions-transport-ws to graphql-ws. The underlying protocol should still be the same, it's just a matter of how to set it up on the client side that's changed. Support for that is out of scope of this project.
Activity
bostandyksoft commentedon Apr 26, 2022
I've notice, that subscriptions are broken since 12.0.0 version. For version 11.0.0 all is good
oliemansm commentedon Apr 26, 2022
Do you have
spring-boot-starter-websocketin your dependencies? In 11.0.0 it would automatically pull in all sorts of spring boot starters, while in 12.0.0 it relies on you to add the proper dependencies. Then the kickstart starter will only enable features depending on things that are on the classpath. Meaning if you do not have a websocket starter on your classpath it will not configure support for subscriptions.In gradle it would be:
bostandyksoft commentedon Apr 26, 2022
Thanks for quick response. This fixes second notice. But apollo client, based on graphql-ws still not working.
oliemansm commentedon Apr 26, 2022
There should be some documentation on the Apollo repo on how to migrate from subscriptions-transport-ws to graphql-ws. The underlying protocol should still be the same, it's just a matter of how to set it up on the client side that's changed. Support for that is out of scope of this project.
KammererTob commentedon Apr 29, 2022
The underlying protocol is not the same i think, mainly because GraphQL did not define it in any spec (see here: https://www.apollographql.com/docs/react/data/subscriptions/#choosing-a-subscription-library).
graphql-wsbesides also supporting thesubscriptionoperation, allows to use GraphQL over WS entirely (unless i misunderstood something). More discussion here: graphql/graphql-over-http#140.I am not sure if this is matured enough already to warrant any work. Although with Apollo already having this implemented it is probably somewhat safe to say that it will stay.
This is the new protocol: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
The correct repo for this would probably be: https://github.com/graphql-java-kickstart/graphql-java-servlet