apollographql / apollo-client

:rocket:  A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server.
https://apollographql.com/client
MIT License
19.38k stars 2.66k forks source link

fix useBackgroundQuery: dispose ref after unmount and not used #11696

Closed PiR1 closed 8 months ago

PiR1 commented 8 months ago

Fixes: https://github.com/apollographql/apollo-client/issues/11649, based on tests created in this pull request: https://github.com/apollographql/apollo-client/pull/11651

netlify[bot] commented 8 months ago

Deploy request for apollo-client-docs pending review.

Visit the deploys page to approve it

Name Link
Latest commit 10833467a70f58c386a395061dc7daf9ee082fd6
changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: 10833467a70f58c386a395061dc7daf9ee082fd6

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

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | @apollo/client | 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

jerelmiller commented 8 months ago

Don't worry about the size and API extractor jobs failing. I'll make sure those get updated before this is merged 🙂

jerelmiller commented 8 months ago

@PiR1 if you wouldn't mind making sure the formatting job passes, I'll get the size/api extractor updated to pass. I'll get this merged in as soon as these are all green.

PiR1 commented 8 months ago

@jerelmiller Thank you very much for all the feedback and explanations! It was very interesting, thank you for your time.

jerelmiller commented 8 months ago

Absolutely! I hope to see more contributions from you in the future! (if you're interested of course 🙂 )