subscriptions-transport-sse icon indicating copy to clipboard operation
subscriptions-transport-sse copied to clipboard

How to use if SubscriptionManager is deprecated

Open kkundanmal-nicejob opened this issue 7 years ago • 5 comments

According to https://github.com/apollographql/graphql-subscriptions, the SubscriptionManager is deprecated.

It seems like subscriptions-transport-sse will not work without SubscriptionManager.

Is there any way to use subscriptions-transport-sse with the current version of Apollo's GraphQL subscriptions without SubscriptionManager?

kkundanmal-nicejob avatar May 09 '18 09:05 kkundanmal-nicejob

+1

mrdulin avatar Sep 06 '18 12:09 mrdulin

Any idea ?

tgensol avatar Jan 01 '19 11:01 tgensol

there is a hook branch from the react-apollo develop branch : Hooks I think you can inspire you from there to build your own useMutation/Subscription etc..

EdouardLauret avatar Feb 14 '19 17:02 EdouardLauret

I believe I am running into this as well, receiving "TypeError: _graphqlSubscriptions.SubscriptionManager is not a constructor" when I attempt to start my express server.

Hey,

I would like you to consider the implementation from: https://github.com/GraphQLCollege/graphql-postgres-subscriptions/blob/master/event-emitter-to-async-iterator.js My bet is, we could get inspired from there to yield an up-to-date solution. The issue is, that we seem to be forced to use that Async Iterator stuff, which seems to us like critical code (could cause Mem-Leaks under special circumstances).

Anyhow, I would claim most people are using apollo-server-express atm so parts of the express.js could be consolidated with the approach from here: https://github.com/GraphQLCollege/graphql-postgres-subscriptions/blob/master/postgres-pubsub.js Maybe the rest of server implementation could be thrown away?

TimSusa avatar May 30 '19 07:05 TimSusa