From 64f0abe85b6fd6b2499ee0abd4620fecb7c56e38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 17:14:15 +0000 Subject: [PATCH] Version Packages --- .changeset/gold-pears-march.md | 5 ---- .changeset/itchy-dodos-approve.md | 5 ---- .changeset/kind-donkeys-clap.md | 5 ---- .changeset/late-planets-argue.md | 23 ------------------- .changeset/serious-candles-arrive.md | 5 ---- .changeset/smooth-spoons-cough.md | 5 ---- CHANGELOG.md | 34 ++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 9 files changed, 37 insertions(+), 51 deletions(-) delete mode 100644 .changeset/gold-pears-march.md delete mode 100644 .changeset/itchy-dodos-approve.md delete mode 100644 .changeset/kind-donkeys-clap.md delete mode 100644 .changeset/late-planets-argue.md delete mode 100644 .changeset/serious-candles-arrive.md delete mode 100644 .changeset/smooth-spoons-cough.md diff --git a/.changeset/gold-pears-march.md b/.changeset/gold-pears-march.md deleted file mode 100644 index 61c37d94328..00000000000 --- a/.changeset/gold-pears-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Don’t prompt for DevTools installation for browser extension page diff --git a/.changeset/itchy-dodos-approve.md b/.changeset/itchy-dodos-approve.md deleted file mode 100644 index 947b12b636c..00000000000 --- a/.changeset/itchy-dodos-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Fix a regression in [3.9.5](https://github.com/apollographql/apollo-client/releases/tag/v3.9.5) where a merge function that returned an incomplete result would not allow the client to refetch in order to fulfill the query. diff --git a/.changeset/kind-donkeys-clap.md b/.changeset/kind-donkeys-clap.md deleted file mode 100644 index 13b8f7f9b82..00000000000 --- a/.changeset/kind-donkeys-clap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Honor the `@nonreactive` directive when using `cache.watchFragment` or the `useFragment` hook to avoid rerendering when using these directives. diff --git a/.changeset/late-planets-argue.md b/.changeset/late-planets-argue.md deleted file mode 100644 index a48a4898545..00000000000 --- a/.changeset/late-planets-argue.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -"@apollo/client": patch ---- - -Create branded `QueryRef` type without exposed properties. - -This change deprecates `QueryReference` in favor of a `QueryRef` type that doesn't expose any properties. -This change also updates `preloadQuery` to return a new `PreloadedQueryRef` type, which exposes the `toPromise` function as it does today. This means that query refs produced by `useBackgroundQuery` and `useLoadableQuery` now return `QueryRef` types that do not have access to a `toPromise` function, which was never meant to be used in combination with these hooks. - -While we tend to avoid any types of breaking changes in patch releases as this, this change was necessary to support an upcoming version of the React Server Component integration, which needed to omit the `toPromise` function that would otherwise have broken at runtime. -Note that this is a TypeScript-only change. At runtime, `toPromise` is still present on all queryRefs currently created by this package - but we strongly want to discourage you from accessing it in all cases except for the `PreloadedQueryRef` use case. - -Migration is as simple as replacing all references to `QueryReference` with `QueryRef`, so it should be possible to do this with a search & replace in most code bases: - -```diff --import { QueryReference } from '@apollo/client' -+import { QueryRef } from '@apollo/client' - -- function Component({ queryRef }: { queryRef: QueryReference }) { -+ function Component({ queryRef }: { queryRef: QueryRef }) { - // ... -} -``` diff --git a/.changeset/serious-candles-arrive.md b/.changeset/serious-candles-arrive.md deleted file mode 100644 index 4f9a8d4536d..00000000000 --- a/.changeset/serious-candles-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Remove `@nonreactive` directives from queries passed to `MockLink` to ensure they are properly matched. diff --git a/.changeset/smooth-spoons-cough.md b/.changeset/smooth-spoons-cough.md deleted file mode 100644 index dd5dc48bde1..00000000000 --- a/.changeset/smooth-spoons-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/client": patch ---- - -Fix an issue where a polled query created in React strict mode may not stop polling after the component unmounts while using the `cache-and-network` fetch policy. diff --git a/CHANGELOG.md b/CHANGELOG.md index 55202abc98c..e4473180110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # @apollo/client +## 3.10.4 + +### Patch Changes + +- [#11838](https://github.com/apollographql/apollo-client/pull/11838) [`8475346`](https://github.com/apollographql/apollo-client/commit/84753462af50d89c8693713990cccf432ff8267d) Thanks [@alex-kinokon](https://github.com/alex-kinokon)! - Don’t prompt for DevTools installation for browser extension page + +- [#11839](https://github.com/apollographql/apollo-client/pull/11839) [`6481fe1`](https://github.com/apollographql/apollo-client/commit/6481fe1196cedee987781dcb45ebdc0cafb3998c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix a regression in [3.9.5](https://github.com/apollographql/apollo-client/releases/tag/v3.9.5) where a merge function that returned an incomplete result would not allow the client to refetch in order to fulfill the query. + +- [#11844](https://github.com/apollographql/apollo-client/pull/11844) [`86984f2`](https://github.com/apollographql/apollo-client/commit/86984f24bd9076a6034acd59bbcb28a2ea1add93) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Honor the `@nonreactive` directive when using `cache.watchFragment` or the `useFragment` hook to avoid rerendering when using these directives. + +- [#11824](https://github.com/apollographql/apollo-client/pull/11824) [`47ad806`](https://github.com/apollographql/apollo-client/commit/47ad806c7b0c55f1e05dbf276ca87a354ac389e5) Thanks [@phryneas](https://github.com/phryneas)! - Create branded `QueryRef` type without exposed properties. + + This change deprecates `QueryReference` in favor of a `QueryRef` type that doesn't expose any properties. + This change also updates `preloadQuery` to return a new `PreloadedQueryRef` type, which exposes the `toPromise` function as it does today. This means that query refs produced by `useBackgroundQuery` and `useLoadableQuery` now return `QueryRef` types that do not have access to a `toPromise` function, which was never meant to be used in combination with these hooks. + + While we tend to avoid any types of breaking changes in patch releases as this, this change was necessary to support an upcoming version of the React Server Component integration, which needed to omit the `toPromise` function that would otherwise have broken at runtime. + Note that this is a TypeScript-only change. At runtime, `toPromise` is still present on all queryRefs currently created by this package - but we strongly want to discourage you from accessing it in all cases except for the `PreloadedQueryRef` use case. + + Migration is as simple as replacing all references to `QueryReference` with `QueryRef`, so it should be possible to do this with a search & replace in most code bases: + + ```diff + -import { QueryReference } from '@apollo/client' + +import { QueryRef } from '@apollo/client' + + - function Component({ queryRef }: { queryRef: QueryReference }) { + + function Component({ queryRef }: { queryRef: QueryRef }) { + // ... + } + ``` + +- [#11845](https://github.com/apollographql/apollo-client/pull/11845) [`4c5c820`](https://github.com/apollographql/apollo-client/commit/4c5c820b6172f6a2455bcdd974109513e0e2a39e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `@nonreactive` directives from queries passed to `MockLink` to ensure they are properly matched. + +- [#11837](https://github.com/apollographql/apollo-client/pull/11837) [`dff15b1`](https://github.com/apollographql/apollo-client/commit/dff15b1b03ebac9cae508c69bf607a29d0f6eccb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a polled query created in React strict mode may not stop polling after the component unmounts while using the `cache-and-network` fetch policy. + ## 3.10.3 ### Patch Changes diff --git a/package-lock.json b/package-lock.json index edfc81e9e74..2c6a0cba213 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@apollo/client", - "version": "3.10.3", + "version": "3.10.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@apollo/client", - "version": "3.10.3", + "version": "3.10.4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 6e4fbcf32f3..e4090db6c95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/client", - "version": "3.10.3", + "version": "3.10.4", "description": "A fully-featured caching GraphQL client.", "private": true, "keywords": [