absinthe-graphql/absinthe-socket

relay-socket dipose() does not send subscriptionId

davidye opened this issue · 1 comments

When calling dispose(), the relay socket does not send a subscriptionId.

I tracked down the problem to this line:

cancel(absintheSocket, notifier);

When this dispose function is called, notifier.subscriptionId is still undefined.

Later on, onSubscriptionSucceed() is called and the notifier is updated with a valid subscriptionId.

const onSubscriptionSucceed = (absintheSocket, notifier, {subscriptionId}) => {

However the notifier instance passed to cancel() is not the instance that was updated, and its subscriptionId is still undefined.

Oops, this is a duplicate of #13.