Grant Wu

Results 37 comments of Grant Wu

I'm pretty sure I'm also running into this - with `apollo-server-express` - see https://github.com/apollographql/apollo-server/blob/422609e62117ac371cd753312040a9a3add833a9/packages/apollo-server-express/src/expressApollo.ts#L47 Actually, is this related to https://github.com/bithavoc/express-winston/pull/120 ?

I think a lot of those still reference Apollo Server 1. Apollo Server 2 seems to have drastically changed a lot of things: https://www.apollographql.com/docs/apollo-server/migration-two-dot.html I'm really short on bandwidth, but...

Can you provide a minimal reproducing example? I don't know why apollo-bot said there was a reproduction.

I'm not 100% sure what you're asking for, but `pubsub.subscribe` and `pubsub.unsubscribe` are mostly actually called internally by `pubsub` implementations in practice, inside the `asyncIterator` implementation. I'm not a fan...

Which PubSubEngine implementation are you using? The example code you listed seems pretty wrong. The subscribe function actually allocates resources and makes a connection in many implementations, it's not something...

If you're referring to https://github.com/apollographql/graphql-subscriptions/blob/master/src/event-emitter-to-async-iterator.ts, yes, it does not use `pubsub.subscribe`. I don't know why. Accepting PRs to fix.

Would it be possible for you to provide a runnable example of the issue? It's kind of vague right now...

I agree this would be a useful thing to document. Do you want to make a PR for it? (Note: I also went ahead and fixed the Markdown in your...

Sounds correct - would you like to make a PR?

The asyncIterator's return function is the intended way of cleaning up server resources, as I understand it. Unfortunately, it's not very reliable: https://github.com/apollographql/graphql-subscriptions/issues/143 This idea seems to be somewhat similar...