#118887fb7939 Thanks @phryneas! - switch useRenderGuard to an approach not accessing React's internals
#115116536369 Thanks @phryneas! - useLoadableQuery: ensure that loadQuery is updated if the ApolloClient instance changes
#118608740f19 Thanks @alessbell! - Fixes #11849 by reevaluating window.fetch each time BatchHttpLink uses it, if not configured via options.fetch. Takes the same approach as PR #8603 which fixed the same issue in HttpLink.
#11852d502a69 Thanks @phryneas! - Fix a bug where calling the useMutationreset function would point the hook to an outdated client reference.
#113293d164ea Thanks @PaLy! - Fix graphQLErrors in Error Link if networkError.result is an empty string
#11852d502a69 Thanks @phryneas! - Prevent writing to a ref in render in useMutation.
As a result, you might encounter problems in the future if you call the mutation's execute function during render. Please note that this was never supported behavior, and we strongly recommend against it.
#11848ad63924 Thanks @phryneas! - Ensure covariant behavior: MockedResponse<X,Y> should be assignable to MockedResponse
#1185145c47be Thanks @phryneas! - Avoid usage of useRef in useInternalState to prevent ref access in render.
#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> }) {
#118887fb7939 Thanks @phryneas! - switch useRenderGuard to an approach not accessing React's internals
#115116536369 Thanks @phryneas! - useLoadableQuery: ensure that loadQuery is updated if the ApolloClient instance changes
#118608740f19 Thanks @alessbell! - Fixes #11849 by reevaluating window.fetch each time BatchHttpLink uses it, if not configured via options.fetch. Takes the same approach as PR #8603 which fixed the same issue in HttpLink.
#11852d502a69 Thanks @phryneas! - Fix a bug where calling the useMutationreset function would point the hook to an outdated client reference.
#113293d164ea Thanks @PaLy! - Fix graphQLErrors in Error Link if networkError.result is an empty string
#11852d502a69 Thanks @phryneas! - Prevent writing to a ref in render in useMutation.
As a result, you might encounter problems in the future if you call the mutation's execute function during render. Please note that this was never supported behavior, and we strongly recommend against it.
#11848ad63924 Thanks @phryneas! - Ensure covariant behavior: MockedResponse<X,Y> should be assignable to MockedResponse
#1185145c47be Thanks @phryneas! - Avoid usage of useRef in useInternalState to prevent ref access in render.
#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> }) {
Bumps the js group with 22 updates in the /frontend directory:
3.8.6
3.10.5
7.22.9
7.24.7
7.21.3
7.24.7
17.4.4
19.3.0
17.4.4
19.2.2
1.13.1
1.16.3
1.12.0
1.13.1
4.5.11
5.0.8
0.4.3
2.0.0
6.5.1
6.5.2
6.4.0
6.5.2
6.4.2
6.5.2
7.98.0
8.9.2
4.1.0
6.6.6
3.3.0
3.5.0
16.8.1
16.8.2
2.19.4
2.21.0
3.0.0
3.1.2
1.58.3
1.77.5
11.2.0
12.0.6
6.2.5
6.2.6
3.1.1
3.3.0
Updates
@apollo/client
from 3.8.6 to 3.10.5Release notes
Sourced from
@apollo/client
's releases.... (truncated)
Changelog
Sourced from
@apollo/client
's changelog.... (truncated)
Commits
a739dfd
Version Packages (#11855)e41580b
Revert "Update router terminology (#11885)" (#11892)5f5326b
docs: add graphql-tag-swc-plugin to performance docs (#11884)3d164ea
fix: graphQLErrors in Error Link if networkError.result is an empty string (#...1aca223
Update router terminology (#11885)3e5e770
chore(deps-dev): bump braces from 3.0.2 to 3.0.3 (#11887)7fb7939
switchuseRenderGuard
to an approach not accessing React's internals (#11888)6536369
enablereact-hooks
lint rules (#11511)08dbc02
use circleci-browsers
image to save some install time (#11889)6ca5ef4
start testing with React 19 (#11883)Updates
@babel/core
from 7.22.9 to 7.24.7Release notes
Sourced from
@babel/core
's releases.... (truncated)
Changelog
Sourced from
@babel/core
's changelog.... (truncated)
Commits
bf1e9a3
v7.24.790fdd7e
Only import types from declared dependencies (#16494)7934963
Usetype: module
in allpackage.json
s (#16535)9630250
v7.24.6553e433
Generate helper metadata at build time (#16501)fbfe16c
Fix source maps for template literals (#16515)6e3539b
[babel 8] Publish.d.ts
files for every package (#16416)e37e64d
Use eslint v9 (#16479)71c247a
[babel 8] Require Node.js^18.20.0 || ^20.10.0 || >=21.0.0
(#16457)ddbea7d
v7.24.5Updates
@babel/eslint-parser
from 7.21.3 to 7.24.7Release notes
Sourced from
@babel/eslint-parser
's releases.... (truncated)
Changelog
Sourced from
@babel/eslint-parser
's changelog.... (truncated)
Commits
bf1e9a3
v7.24.77934963
Usetype: module
in allpackage.json
s (#16535)9630250
v7.24.6e37e64d
Use eslint v9 (#16479)97c3eb1
RemovesyntaxType
option for record-and-tuple (parser&plugin) (#16458)71c247a
[babel 8] Require Node.js^18.20.0 || ^20.10.0 || >=21.0.0
(#16457)ddbea7d
v7.24.50128984
Relax ESLint peerDependency constraint to allow v9 (#16414)ee48754
Use multiple TypeScript projects (#16430)822b025
v7.24.1Updates
@commitlint/cli
from 17.4.4 to 19.3.0Release notes
Sourced from
@commitlint/cli
's releases.... (truncated)
Changelog
Sourced from
@commitlint/cli
's changelog.... (truncated)
Commits
447fd3b
v19.3.066dd3a5
v19.2.2172cb52
v19.2.1f91d539
Fix regression when using --last flag (#3982)a64b417
v19.2.099f4f3f
feat(cli): introduce new --last flag, to stop recommending HEAD~1 (#3916)8d7a3d5
v19.1.09b4ac34
v19.0.3e538924
v19.0.29351b8e
v19.0.1Updates
@commitlint/config-conventional
from 17.4.4 to 19.2.2Release notes
Sourced from
@commitlint/config-conventional
's releases.... (truncated)
Changelog
Sourced from
@commitlint/config-conventional
's changelog.Superseded by #270.