Skip to content

Commit fa3487d

Browse files
Version Packages (#11967)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7b8028e commit fa3487d

25 files changed

+102
-133
lines changed

.changeset/angry-ravens-mate.md

-5
This file was deleted.

.changeset/angry-seals-jog.md

-5
This file was deleted.

.changeset/breezy-deers-dream.md

-5
This file was deleted.

.changeset/chilly-dots-shake.md

-5
This file was deleted.

.changeset/clever-bikes-admire.md

-5
This file was deleted.

.changeset/curly-vans-draw.md

-5
This file was deleted.

.changeset/early-tips-vanish.md

-5
This file was deleted.

.changeset/flat-onions-guess.md

-5
This file was deleted.

.changeset/fluffy-badgers-rush.md

-5
This file was deleted.

.changeset/good-suns-happen.md

-5
This file was deleted.

.changeset/hungry-rings-help.md

-5
This file was deleted.

.changeset/little-suits-return.md

-5
This file was deleted.

.changeset/nasty-olives-act.md

-5
This file was deleted.

.changeset/pink-ants-remember.md

-16
This file was deleted.

.changeset/pink-flowers-switch.md

-5
This file was deleted.

.changeset/proud-humans-begin.md

-5
This file was deleted.

.changeset/slimy-balloons-cheat.md

-5
This file was deleted.

.changeset/slimy-berries-yawn.md

-14
This file was deleted.

.changeset/tasty-chairs-dress.md

-5
This file was deleted.

.changeset/thin-lies-begin.md

-5
This file was deleted.

.changeset/unlucky-birds-press.md

-5
This file was deleted.

.changeset/weak-ads-develop.md

-5
This file was deleted.

CHANGELOG.md

+99
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,104 @@
11
# @apollo/client
22

3+
## 3.11.0
4+
5+
### Potentially Breaking Fixes
6+
7+
- [#11789](https://github.com/apollographql/apollo-client/pull/11789) [`5793301`](https://github.com/apollographql/apollo-client/commit/579330147d6bd6f7167a35413a33746103e375cb) Thanks [@phryneas](https://github.com/phryneas)! - Changes usages of the `GraphQLError` type to `GraphQLFormattedError`.
8+
9+
This was a type bug - these errors were never `GraphQLError` instances
10+
to begin with, and the `GraphQLError` class has additional properties that can
11+
never be correctly rehydrated from a GraphQL result.
12+
The correct type to use here is `GraphQLFormattedError`.
13+
14+
Similarly, please ensure to use the type `FormattedExecutionResult`
15+
instead of `ExecutionResult` - the non-"Formatted" versions of these types
16+
are for use on the server only, but don't get transported over the network.
17+
18+
- [#11626](https://github.com/apollographql/apollo-client/pull/11626) [`228429a`](https://github.com/apollographql/apollo-client/commit/228429a1d36eae691473b24fb641ec3cd84c8a3d) Thanks [@phryneas](https://github.com/phryneas)! - Call `nextFetchPolicy` with "variables-changed" even if there is a `fetchPolicy` specified.
19+
20+
Previously this would only be called when the current `fetchPolicy` was equal to the `fetchPolicy` option or the option was not specified. If you use `nextFetchPolicy` as a function, expect to see this function called more often.
21+
22+
Due to this bug, this also meant that the `fetchPolicy` might be reset to the initial `fetchPolicy`, even when you specified a `nextFetchPolicy` function. If you previously relied on this behavior, you will need to update your `nextFetchPolicy` callback function to implement this resetting behavior.
23+
24+
As an example, if your code looked like the following:
25+
26+
```js
27+
useQuery(QUERY, {
28+
nextFetchPolicy(currentFetchPolicy, info) {
29+
// your logic here
30+
}
31+
);
32+
```
33+
34+
Update your function to the following to reimplement the resetting behavior:
35+
36+
```js
37+
useQuery(QUERY, {
38+
nextFetchPolicy(currentFetchPolicy, info) {
39+
if (info.reason === 'variables-changed') {
40+
return info.initialFetchPolicy;
41+
}
42+
// your logic here
43+
}
44+
);
45+
```
46+
47+
### Minor Changes
48+
49+
- [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useQueryRefHandlers`.
50+
51+
- [#11854](https://github.com/apollographql/apollo-client/pull/11854) [`3812800`](https://github.com/apollographql/apollo-client/commit/3812800c6e4e5e3e64f473543babdba35ce100c2) Thanks [@jcostello-atlassian](https://github.com/jcostello-atlassian)! - Support extensions in useSubscription
52+
53+
- [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useLoadableQuery`.
54+
55+
- [#11863](https://github.com/apollographql/apollo-client/pull/11863) [`98e44f7`](https://github.com/apollographql/apollo-client/commit/98e44f74cb7c7e93a81bdc7492c9218bf4a2dcd4) Thanks [@phryneas](https://github.com/phryneas)! - Reimplement `useSubscription` to fix rules of React violations.
56+
57+
- [#11869](https://github.com/apollographql/apollo-client/pull/11869) [`a69327c`](https://github.com/apollographql/apollo-client/commit/a69327cce1b36e8855258e9b19427511e0af8748) Thanks [@phryneas](https://github.com/phryneas)! - Rewrite big parts of `useQuery` and `useLazyQuery` to be more compliant with the Rules of React and React Compiler
58+
59+
- [#11936](https://github.com/apollographql/apollo-client/pull/11936) [`1b23337`](https://github.com/apollographql/apollo-client/commit/1b23337e5a9eec4ce3ed69531ca4f4afe8e897a6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to specify a name for the client instance for use with Apollo Client Devtools. This is useful when instantiating multiple clients to identify the client instance more easily. This deprecates the `connectToDevtools` option in favor of a new `devtools` configuration.
60+
61+
```ts
62+
new ApolloClient({
63+
devtools: {
64+
enabled: true,
65+
name: "Test Client",
66+
},
67+
});
68+
```
69+
70+
This option is backwards-compatible with `connectToDevtools` and will be used in the absense of a `devtools` option.
71+
72+
- [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useBackgroundQuery`.
73+
74+
- [#11930](https://github.com/apollographql/apollo-client/pull/11930) [`a768575`](https://github.com/apollographql/apollo-client/commit/a768575ac1454587208aad63abc811b6a966fe72) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deprecates experimental schema testing utilities introduced in 3.10 in favor of recommending [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library).
75+
76+
### Patch Changes
77+
78+
- [#11951](https://github.com/apollographql/apollo-client/pull/11951) [`0de03af`](https://github.com/apollographql/apollo-client/commit/0de03af912a76c4e0111f21b4f90a073317b63b6) Thanks [@phryneas](https://github.com/phryneas)! - add React 19 RC to `peerDependencies`
79+
80+
- [#11927](https://github.com/apollographql/apollo-client/pull/11927) [`2941824`](https://github.com/apollographql/apollo-client/commit/2941824dd66cdd20eee5f2293373ad7a9cf991a4) Thanks [@phryneas](https://github.com/phryneas)! - Add `restart` function to `useSubscription`.
81+
82+
- [#11949](https://github.com/apollographql/apollo-client/pull/11949) [`4528918`](https://github.com/apollographql/apollo-client/commit/45289186bcaaa33dfe904913eb6df31e2541c219) Thanks [@alessbell](https://github.com/alessbell)! - Remove deprecated `watchFragment` option, `canonizeResults`
83+
84+
- [#11937](https://github.com/apollographql/apollo-client/pull/11937) [`78332be`](https://github.com/apollographql/apollo-client/commit/78332be32a9af0da33eb3e4100e7a76c3eac2496) Thanks [@phryneas](https://github.com/phryneas)! - `createSchemaFetch`: simulate serialized errors instead of an `ApolloError` instance
85+
86+
- [#11902](https://github.com/apollographql/apollo-client/pull/11902) [`96422ce`](https://github.com/apollographql/apollo-client/commit/96422ce95b923b560321a88acd2eec35cf2a1c18) Thanks [@phryneas](https://github.com/phryneas)! - Add `cause` field to `ApolloError`.
87+
88+
- [#11806](https://github.com/apollographql/apollo-client/pull/11806) [`8df6013`](https://github.com/apollographql/apollo-client/commit/8df6013b6b45452ec058fab3e068b5b6d6c493f7) Thanks [@phryneas](https://github.com/phryneas)! - MockLink: add query default variables if not specified in mock request
89+
90+
- [#11926](https://github.com/apollographql/apollo-client/pull/11926) [`3dd6432`](https://github.com/apollographql/apollo-client/commit/3dd64324dc5156450cead27f8141ea93315ffe65) Thanks [@phryneas](https://github.com/phryneas)! - `watchFragment`: forward additional options to `diffOptions`
91+
92+
- [#11946](https://github.com/apollographql/apollo-client/pull/11946) [`7d833b8`](https://github.com/apollographql/apollo-client/commit/7d833b80119a991e6d2eb58f2c71074d697b8e63) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where mutations were not accessible by Apollo Client Devtools in 3.11.0-rc.0.
93+
94+
- [#11944](https://github.com/apollographql/apollo-client/pull/11944) [`8f3d7eb`](https://github.com/apollographql/apollo-client/commit/8f3d7eb3bc2e0c2d79c5b1856655abe829390742) Thanks [@sneyderdev](https://github.com/sneyderdev)! - Allow `IgnoreModifier` to be returned from a `optimisticResponse` function when inferring from a `TypedDocumentNode` when used with a generic argument.
95+
96+
- [#11954](https://github.com/apollographql/apollo-client/pull/11954) [`4a6e86a`](https://github.com/apollographql/apollo-client/commit/4a6e86aeaf6685abf0dd23110784848c8b085735) Thanks [@phryneas](https://github.com/phryneas)! - Document (and deprecate) the previously undocumented `errors` property on the `useQuery` `QueryResult` type.
97+
98+
- [#11719](https://github.com/apollographql/apollo-client/pull/11719) [`09a6677`](https://github.com/apollographql/apollo-client/commit/09a6677ec1a0cffedeecb2cbac5cd3a3c8aa0fa1) Thanks [@phryneas](https://github.com/phryneas)! - Allow wrapping `createQueryPreloader`
99+
100+
- [#11921](https://github.com/apollographql/apollo-client/pull/11921) [`70406bf`](https://github.com/apollographql/apollo-client/commit/70406bfd2b9a645d781638569853d9b435e047df) Thanks [@phryneas](https://github.com/phryneas)! - add `ignoreResults` option to `useSubscription`
101+
3102
## 3.11.0-rc.2
4103
5104
### Patch Changes

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/client",
3-
"version": "3.10.8",
3+
"version": "3.11.0",
44
"description": "A fully-featured caching GraphQL client.",
55
"private": true,
66
"keywords": [

0 commit comments

Comments
 (0)