type-graphql
type-graphql copied to clipboard
Mention subscription setup difference between Apollo v2.x & v3.x
Describe the issue
The documentation about subscriptions setup states that :
Fortunately, to make subscriptions work, we don't need to manually provide a transport layer that doesn't have constraints of HTTP and can do a push-based communication (WebSockets). The apollo-server package has built-in subscriptions support using websockets, so it works out of the box without any changes to our bootstrap config
This is outdated at least from Apollo ^3.x.x where built-in subscription support has been dropped. But there is no mention of that nuance in that particular section. As a result, subscription examples are misleading since they rely on Apollo 2.x.x .
A fix would be to :
- update that section to warn that from Apollo ^3.x.x there's no more built in support for subscription setup
- eventually add an example for apollo 3.x.x subscription setup in the docs
Are you able to make a PR that fix this? I'd love to, if pointed to the right place.
I have an issue publishing message from Redis CLI to graphql subscription using the graphql-Redis-subscription package. please any way to resolve this.
do you have a work around?
The docs has been updated for the v2.0: https://github.com/MichalLytek/type-graphql/pull/1331/files#diff-5abc97b45da96920824409f599e3a905efc4242c25dea03280300b39c8be1b89
I also need to update the examples code.