notiz-dev / nestjs-prisma-starter

Starter template for NestJS 😻 includes GraphQL with Prisma Client, Passport-JWT authentication, Swagger Api and Docker
MIT License
2.36k stars 337 forks source link

By default, Apollo's PubSub does not support production environments. Should we consider replacing it with Redis? #480

Open Justin3go opened 1 year ago

Justin3go commented 1 year ago

WARNING The installSubscriptionHandlers configuration option has been removed from the latest version of Apollo server and will be soon deprecated in this package as well. By default, installSubscriptionHandlers will fallback to use the subscriptions-transport-ws (read more) but we strongly recommend using the graphql-ws(read more) library instead.

NOTE PubSub is a class that exposes a simple publish and subscribe API. Read more about it here. Note that the Apollo docs warn that the default implementation is not suitable for production (read more here). Production apps should use a PubSub implementation backed by an external store (read more here).

nest docs

graphql-redis-subscriptions

Maybe I can get this done.

Justin3go commented 1 year ago

And add JWT verify in subscription

limitless-dev commented 1 year ago

I think we should. In time being, I have switched to graphql-ws https://github.com/notiz-dev/nestjs-prisma-starter/pull/481#issuecomment-1611882141 , but that still doesn't eliminate Apollo's PubSub.