From 6881a041399ab4a81b896247d5b72209d0e913de Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 15:06:54 +0000 Subject: [PATCH] Version Packages --- .changeset/gold-pears-march.md | 5 ----- .changeset/kind-donkeys-clap.md | 5 ----- .changeset/late-planets-argue.md | 23 ----------------------- .changeset/smooth-spoons-cough.md | 5 ----- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 33 insertions(+), 41 deletions(-) delete mode 100644 .changeset/gold-pears-march.md delete mode 100644 .changeset/kind-donkeys-clap.md delete mode 100644 .changeset/late-planets-argue.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/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/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..ed6762e31e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # @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 + +- [#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 }) { + // ... + } + ``` + +- [#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": [