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

(graphcache) - only allow for one onOnline listener at a given time #1896

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

JoviDeCroock
Copy link
Collaborator

Summary

When we reset the urql-client a few time the offlineExchange will call onOnline again, however the default-storage instance stays the same as it's globally defined most of the time (in our examples, ...), this holds a reference to the currently defined callback and removes the event-listener when we call onOnline again.

Resolves #1876

Set of changes

  • remove event-listener on repeated onOnline calls

@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2021

🦋 Changeset detected

Latest commit: d21de47

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@urql/exchange-graphcache Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JoviDeCroock JoviDeCroock merged commit dbb52bd into main Aug 27, 2021
@JoviDeCroock JoviDeCroock deleted the allow-cleanup-in-default-storage branch August 27, 2021 11:44
@urql-ci urql-ci mentioned this pull request Aug 27, 2021
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

Successfully merging this pull request may close these issues.

(graphcache) - Provide method to or detect disposal for storages
2 participants