type-graphql icon indicating copy to clipboard operation
type-graphql copied to clipboard

Mention subscription setup difference between Apollo v2.x & v3.x

Open exaucae opened this issue 2 years ago • 3 comments

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.

exaucae avatar Feb 17 '22 17:02 exaucae

I have an issue publishing message from Redis CLI to graphql subscription using the graphql-Redis-subscription package. please any way to resolve this.

victormazeli avatar Mar 21 '22 11:03 victormazeli

do you have a work around?

AmitShimon198 avatar Oct 03 '22 19:10 AmitShimon198

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.

MichalLytek avatar Oct 11 '22 09:10 MichalLytek