Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsubscribe not working #48

Open
michaeljguarino opened this issue May 22, 2020 · 2 comments
Open

Unsubscribe not working #48

michaeljguarino opened this issue May 22, 2020 · 2 comments

Comments

@michaeljguarino
Copy link

I've been debugging some issues in one of my apps, and drilled down to the most likely cause being apollo subscription cancels not flushing to the absinthe socket. To reproduce, I simply called a subscribeToMore for one of my queries and immediately called the cancel callback function after, and observed no unsubscribe event pushed to the socket.

I'm using a newer version of apollo, so this might be a regression (and i seem to remember seeing this working with older versions of apollo's react client). Here are the versions:

"@absinthe/socket": "^0.2.1",
"@absinthe/socket-apollo-link": "^0.2.1",
"@apollo/react-hooks": "^3.1.5",
"apollo-boost": "^0.4.7",
@bernardo-martinez
Copy link

hey! I think i have the same issue. I'm using "@absinthe/socket": { "version": "0.2.1" }

I'm following the approach described on the documentation: creating an Observable, calling subscribe on it and afterwards calling unsubscribe on the subscription it returns.

I'm doing this on some tests on Jest and unsubscribing on the afterAllcallback, but in the end Jest keeps complaining with: Jest did not exit one second after the test run has completed and it keeps running, which leds me think the connection wasn't closed correctly

@ademola-raimi
Copy link

ademola-raimi commented Aug 3, 2021

Hello, Does anyone have a solution to this? Apparently, the issue was also discussed here, but the solution did not work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants