apollo-angular: upgrading apollo client to latest version for unsupported transport package with websocket subscriptions
Describe the bug
apollographql/subscriptions-transport-ws is not supported, nor maintained. Please, use https://github.com/enisdenjo/graphql-ws.
To Reproduce using websocket based subscription queries
Expected behavior not working and suggests switching graphql-ws which latest version of apollo-client uses
Environment:
- @angular/cli@XX.YY.ZZ
- @angular/core@XX.YY.ZZ
- @apollo/client@XX.YY.ZZ
- apollo-angular@XX.YY.ZZ
- graphql@XX.YY.ZZ
- typescript@XX.YY.ZZ
Additional context
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 15 (4 by maintainers)
Subscription queries by using
graphql-wswithapollo-angular@3xandangular@13xHey @KeithGillette and @neaplus Based on your answers, we were able to narrow down the problem and now also solve it. It was right, the backend server did not had the correct version. We use “Hot Chocolate” in version 12 but in tihs version the subscriptions are not fully activated. So the error accurs. They work on a new version in which the graphql-ws library is fully included. We checked this with a preview version an it works.
Thank you very much for your help. 💯
Here some links referenced: https://stackoverflow.com/questions/72115080/subscription-doesnt-work-with-apollo-client-and-hot-chocolate-net-core-web-api https://github.com/ChilliCream/hotchocolate/issues/3758
indeed, it works 🤌 thanks dude. I’ll drop a simple sample here as well in case of someone needs, since It’s not documented.