From c8910b15a23bad8e22de41f594921735fde814d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 15 Dec 2023 09:52:34 +0000 Subject: [PATCH] Version Packages (alpha) --- .changeset/pre.json | 3 +++ CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index f51bce71873..4add6d13e82 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -20,8 +20,11 @@ "sixty-boxes-rest", "sour-sheep-walk", "strong-terms-perform", + "swift-zoos-collect", "thick-mice-collect", + "thick-tips-cry", "thirty-ties-arrive", + "unlucky-rats-decide", "violet-lions-draw", "wild-dolphins-jog", "yellow-flies-repeat" diff --git a/CHANGELOG.md b/CHANGELOG.md index c7326ece2c7..f29c5ef90f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # @apollo/client +## 3.9.0-alpha.6 + +### Minor Changes + +- [#11397](https://github.com/apollographql/apollo-client/pull/11397) [`3f7eecbfb`](https://github.com/apollographql/apollo-client/commit/3f7eecbfbd4f4444cffcaac7dd9fd225c8c2a401) Thanks [@aditya-kumawat](https://github.com/aditya-kumawat)! - Adds a new `skipPollAttempt` callback function that's called whenever a refetch attempt occurs while polling. If the function returns `true`, the refetch is skipped and not reattempted until the next poll interval. This will solve the frequent use-case of disabling polling when the window is inactive. + + ```ts + useQuery(QUERY, { + pollInterval: 1000, + skipPollAttempt: () => document.hidden, // or !document.hasFocus() + }); + // or define it globally + new ApolloClient({ + defaultOptions: { + watchQuery: { + skipPollAttempt: () => document.hidden, // or !document.hasFocus() + }, + }, + }); + ``` + +### Patch Changes + +- [#11369](https://github.com/apollographql/apollo-client/pull/11369) [`2a4716466`](https://github.com/apollographql/apollo-client/commit/2a471646616e3af1b5c039e961f8d5717fad8f32) Thanks [@phryneas](https://github.com/phryneas)! - Persisted Query Link: improve memory management + + - use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results + - hash cache is initiated lazily, only when needed + - expose `persistedLink.resetHashCache()` method + - reset hash cache if the upstream server reports it doesn't accept persisted queries + +- [#10804](https://github.com/apollographql/apollo-client/pull/10804) [`221dd99ff`](https://github.com/apollographql/apollo-client/commit/221dd99ffd1990f8bd0392543af35e9b08d0fed8) Thanks [@phryneas](https://github.com/phryneas)! - use WeakMap in React Native with Hermes + ## 3.9.0-alpha.5 ### Minor Changes diff --git a/package-lock.json b/package-lock.json index 71a75840fdf..c18d6ebb4a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@apollo/client", - "version": "3.9.0-alpha.5", + "version": "3.9.0-alpha.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@apollo/client", - "version": "3.9.0-alpha.5", + "version": "3.9.0-alpha.6", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index dc9e6941396..72f720e39d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/client", - "version": "3.9.0-alpha.5", + "version": "3.9.0-alpha.6", "description": "A fully-featured caching GraphQL client.", "private": true, "keywords": [