#118396481fe1 Thanks @jerelmiller! - Fix a regression in 3.9.5 where a merge function that returned an incomplete result would not allow the client to refetch in order to fulfill the query.
#1184486984f2 Thanks @jerelmiller! - Honor the @nonreactive directive when using cache.watchFragment or the useFragment hook to avoid rerendering when using these directives.
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:
-import { QueryReference } from '@apollo/client'
+import { QueryRef } from '@apollo/client'
function Component({ queryRef }: { queryRef: QueryReference<TData> }) {
#118454c5c820 Thanks @jerelmiller! - Remove @nonreactive directives from queries passed to MockLink to ensure they are properly matched.
#11837dff15b1 Thanks @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.
#118212675d3c Thanks @jerelmiller! - Fix a regression where rerendering a component with useBackgroundQuery would recreate the queryRef instance when used with React's strict mode.
#118212675d3c Thanks @jerelmiller! - Revert the change introduced in
3.9.10 via #11738 that disposed of queryRefs synchronously. This change caused too many issues with strict mode.
#118396481fe1 Thanks @jerelmiller! - Fix a regression in 3.9.5 where a merge function that returned an incomplete result would not allow the client to refetch in order to fulfill the query.
#1184486984f2 Thanks @jerelmiller! - Honor the @nonreactive directive when using cache.watchFragment or the useFragment hook to avoid rerendering when using these directives.
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:
-import { QueryReference } from '@apollo/client'
+import { QueryRef } from '@apollo/client'
function Component({ queryRef }: { queryRef: QueryReference<TData> }) {
#118454c5c820 Thanks @jerelmiller! - Remove @nonreactive directives from queries passed to MockLink to ensure they are properly matched.
#11837dff15b1 Thanks @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.
#118212675d3c Thanks @jerelmiller! - Fix a regression where rerendering a component with useBackgroundQuery would recreate the queryRef instance when used with React's strict mode.
#118212675d3c Thanks @jerelmiller! - Revert the change introduced in
3.9.10 via #11738 that disposed of queryRefs synchronously. This change caused too many issues with strict mode.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps @apollo/client from 3.8.8 to 3.10.4.
Release notes
Sourced from
@apollo/client
's releases.... (truncated)
Changelog
Sourced from
@apollo/client
's changelog.... (truncated)
Commits
d773000
Version Packages (#11843)6481fe1
Fix merge function that returns incomplete result that did not refetch from n...4c5c820
Remove@nonreactive
directives from queries passed toMockLink
(#11845)86984f2
Honor@nonreactive
withuseFragment
andcache.watchFragment
(#11844)8475346
Don’t prompt for DevTools installation for browser extension page (#11838)dff15b1
Fix issue where query may not stop polling after unmount when in Strict mode ...47ad806
create brandedQueryRef
type without exposed properties (#11824)857f100
[docs] Update explainer around reducing-bundle-size (#11791)3861b7c
chore(docs): fix url for reset function (#11836)50da867
Version Packages (#11833)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show