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

Observer is not attached to notifier #56

Open
jesusbotella opened this issue Mar 2, 2021 · 0 comments
Open

Observer is not attached to notifier #56

jesusbotella opened this issue Mar 2, 2021 · 0 comments

Comments

@jesusbotella
Copy link

Hello everyone!
I'm using @absinthe/socket-apollo-link 0.2.1 (with phoenix 1.5.7), and this error triggers quite frequently after refreshing socket connections.

In our platform, an active socket connection is closed right after the token expires, we refresh the token, and then reconnect it again.

Seems like whenever a socket connection is closed, socket-apollo-link refreshes those observables, but then when Apollo tries to unsubscribe because components are re-rendering after the credentials change, socket-apollo-link does not find those previously registered observables that Apollo has but the notifier is still active.

It doesn't always happen, but I'm receiving error reports quite often because of that, so probably there's a race condition?
Do I need to call Apollo's reFetchObservableQueries after reconnecting the socket to solve this? 🤔

Thank you!

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

1 participant