#131286c0b8e4 Thanks @pavelivanov! - Fix useQuery hydration mismatch when ssr: false and skip: true are used together
When both options were combined, the server would return loading: false (because useSSRQuery checks skip first), but the client's getServerSnapshot was returning ssrDisabledResult with loading: true, causing a hydration mismatch.
#13111bf46fe0 Thanks @RogerHYang! - Fix createFetchMultipartSubscription to support cancellation via AbortController
Previously, calling dispose() or unsubscribe() on a subscription created by createFetchMultipartSubscription had no effect - the underlying fetch request would continue running until completion. This was because no AbortController was created or passed to fetch(), and no cleanup function was returned from the Observable.
#131058b62263 Thanks @phryneas! - ssrMode, ssrForceFetchDelay or prioritizeCacheValues should not override fetchPolicy: 'cache-only', fetchPolicy: 'no-cache', fetchPolicy: 'standby', skip: true, or skipToken when reading the initial value of an ObservableQuery.
#131058b62263 Thanks @phryneas! - Fix skipToken in useQuery with prerenderStatic and related SSR functions.
#131058b62263 Thanks @phryneas! - Avoid fetches with fetchPolicy: no-cache in useQuery with prerenderStatic and related SSR functions.
#12927785e223 Thanks @jerelmiller! - You can now provide a callback function as the context option on the mutate function returned by useMutation. The callback function is called with the value of the context option provided to the useMutation hook. This is useful if you'd like to merge the context object provided to the useMutation hook with a value provided to the mutate function.
functionMyComponent() {const[mutate,result]=useMutation(MUTATION,{context:{foo: true},});asyncfunctionrunMutation() {awaitmutate({// sends context as { foo: true, bar: true }
context:(hookContext)=>({...hookContext,bar: true}),});}// ...
}
#1292394ea3e3 Thanks @jerelmiller! - Fix an issue where deferred payloads that returned arrays with fewer items than the original cached array would retain items from the cached array. This change includes @stream arrays where stream arrays replace the cached arrays.
#1292796b531f Thanks @jerelmiller! - Don't set the fallback value of a @client field to null when a read function is defined. Instead the read function will be called with an existing value of undefined to allow default arguments to be used to set the returned value.
When a read function is not defined nor is there a defined resolver for the field, warn and set the value to null only in that instance.
#1292745ebb52 Thanks @jerelmiller! - Add support for from: null in client.watchFragment and cache.watchFragment. When from is null, the emitted result is:
{data: null,dataState:"complete",complete: true,}
#129262b7f2c1 Thanks @jerelmiller! - Support the newer incremental delivery format for the @defer directive implemented in graphql@17.0.0-alpha.9. Import the GraphQL17Alpha9Handler to use the newer incremental delivery format with @defer.
[!NOTE]
In order to use the GraphQL17Alpha9Handler, the GraphQL server MUST implement the newer incremental delivery format. You may see errors or unusual behavior if you use the wrong handler. If you are using Apollo Router, continue to use the Defer20220824Handler because Apollo Router does not yet support the newer incremental delivery format.
#1292745ebb52 Thanks @jerelmiller! - Add support for arrays with useFragment, useSuspenseFragment, and client.watchFragment. This allows the ability to use a fragment to watch multiple entities in the cache. Passing an array to from will return data as an array where each array index corresponds to the index in the from array.
functionMyComponent() {constresult=useFragment({fragment,from:[item1,item2,item3],});// `data` is an array with 3 items
console.log(result);// { data: [{...}, {...}, {...}], dataState: "complete", complete: true }
}
#1292745ebb52 Thanks @jerelmiller! - Add a getCurrentResult function to the observable returned by client.watchFragment and cache.watchFragment that returns the current value for the watched fragment.
#13038109efe7 Thanks @jerelmiller! - Add the from option to readFragment, watchFragment, and updateFragment.
#129182e224b9 Thanks @jerelmiller! - Add support for the @stream directive on both the Defer20220824Handler and the GraphQL17Alpha2Handler.
[!NOTE]
The implementations of @stream differ in the delivery of incremental results between the different GraphQL spec versions. If you upgrading from the older format to the newer format, expect the timing of some incremental results to change.
#13056b224efc Thanks @jerelmiller! - InMemoryCache no longer filters out explicitly returned undefined items from read functions for array fields. This now makes it possible to create read functions on array fields that return partial data and trigger a fetch for the full list.
#13058121a2cb Thanks @jerelmiller! - Add an extensions option to cache.write, cache.writeQuery, and client.writeQuery. This makes extensions available in cache merge functions which can be accessed with the other merge function options.
As a result of this change, any extensions returned in GraphQL operations are now available in merge in the cache writes for these operations.
#1292796b531f Thanks @jerelmiller! - Add an abstract resolvesClientField function to ApolloCache that can be used by caches to tell LocalState if it can resolve a @client field when a local resolver is not defined.
LocalState will emit a warning and set a fallback value of null when no local resolver is defined and resolvesClientField returns false, or isn't defined. Returning true from resolvesClientField signals that a mechanism in the cache will set the field value. In this case, LocalState won't set the field value.
#13078bf1e0dc Thanks @phryneas! - Use the default stream merge function for @stream fields only if stream info is present. This change means that using the older Defer20220824Handler will not use the default stream merge function and will instead truncate the streamed array on the first chunk.
Patch Changes
#12884d329790 Thanks @phryneas! - Ensure that PreloadedQueryRef instances are unsubscribed when garbage collected
#130861a1d408 Thanks @phryneas! - Change the returned value from null to {} when all fields in a query were skipped.
This also fixes a bug where useSuspenseQuery would suspend indefinitely when all fields were skipped.
#130107627000 Thanks @jerelmiller! - Fix an issue where errors parsed from incremental chunks in ErrorLink might throw when using the GraphQL17Alpha9Handler.
#1292745ebb52 Thanks @jerelmiller! - Deduplicate watches created by useFragment, client.watchFragment, and cache.watchFragment that contain the same fragment, variables, and identifier. This should improve performance in situations where a useFragment or a client.watchFragment is used to watch the same object in multiple places of an application.
#12927259ae9b Thanks @jerelmiller! - Allow FragmentType not only to be called as FragmentType<TData>, but also as FragmentType<TypedDocumentNode>.
#129255851800 Thanks @jerelmiller! - Fix an issue where calling fetchMore with @defer or @stream would not rerender incremental results as they were streamed.
#13083f3c2be1 Thanks @phryneas! - Expose the ExtensionsWithStreamInfo type for extensions in Cache.writeQuery, Cache.write and Cache.update so other cache implementations also can correctly access them.
#1292394ea3e3 Thanks @jerelmiller! - Improve the cache data loss warning message when existing or incoming is an array.
#129274631175 Thanks @jerelmiller! - Ignore top-level data values on subsequent chunks in incremental responses.
#129274631175 Thanks @jerelmiller! - Fix the Defer20220824Handler.SubsequentResult type to match the FormattedSubsequentIncrementalExecutionResult type in graphql@17.0.0-alpha.2.
#1292796b531f Thanks @jerelmiller! - Warn when using a no-cache fetch policy without a local resolver defined. no-cache queries do not read or write to the cache which meant no-cache queries are silently incomplete when the @client field value was handled by a cache read function.
#129275776ea0 Thanks @jerelmiller! - Update the accept header used with the GraphQL17Alpha9Handler to multipart/mixed;incrementalSpec=v0.2 to ensure the newest incremental delivery format is requested.
#1292745ebb52 Thanks @jerelmiller! - DeepPartial<Array<TData>> now returns Array<DeepPartial<TData>> instead of Array<DeepPartial<TData | undefined>>.
#1307199ffe9a Thanks @phryneas! - prerenderStatic: Expose return value of renderFunction to userland, fix aborted property.
This enables usage of resumeAndPrerender with React 19.2.
#1302605eee67 Thanks @jerelmiller! - Reduce the number of observables created by watchFragment by reusing existing observables as much as possible. This should improve performance when watching the same item in the cache multiple times after a cache update occurs.
#130107627000 Thanks @jerelmiller! - Handle @stream payloads that send multiple items in the same chunk when using the Defer20220824Handler.
#130107627000 Thanks @jerelmiller! - Handle an edge case with the Defer20220824Handler where an error for a @stream item that bubbles to the @stream boundary (such as an item returning null for a non-null array item) would write items from future chunks to the wrong array index. In these cases, the @stream field is no longer processed and future updates to the field are ignored. This prevents runtime errors that TypeScript would otherwise not be able to catch.
#130811e06ad7 Thanks @jerelmiller! - Avoid calling merge functions more than once for the same incremental chunk.
This fixes an issue where the change introduced in 4.0.11 via #13049 would not
be applied if defaultOptions for watchQuery were declared.
Please note that compact and mergeOptions are considered internal utilities
and they might have similar behavior changes in future releases.
Do not use them in your application code - a change like this is not considered
breaking and will not be announced as such.
#130508020829 Thanks @phryneas! - Replace usage of findLast with more backwards-compatible methods.
#1304905638de Thanks @phryneas! - Fixes an issue where queries starting with skipToken or lazy queries from useLazyQuery were included in client.refetchQueries() before they had been executed for the first time. While generally queries with a standbyfetchPolicy should be included in refetch, these queries never had variables passed in, so they should be excluded until they have run once and received their actual variables.
These queries are now properly excluded from refetch operations until after their initial execution.
This change adds a new hidden option to client.watchQuery, [variablesUnknownSymbol], which may be set true for queries starting with a fetchPolicy of standby. It will only be applied when creating the ObservableQuery instance and cannot be changed later. This flag indicates that the query's variables are not yet known, and thus it should be excluded from refetch operations until they are. This option is not meant for everyday use and is intended for framework integrations only.
#129938f3bc9b Thanks @jerelmiller! - Fix an issue where switching from options with variables to skipToken with useSuspenseQuery and useBackgroundQuery would create a new ObservableQuery. This could cause unintended refetches where variables were absent in the request when the query was referenced with refetchQueries.
#129373b0d89b Thanks @phryneas! - Fix a problem with fetchMore where the loading state wouldn't reset if the result wouldn't result in a data update.
#12892db8a04b Thanks @jerelmiller! - Prevent unhandled rejections from the promise returned by calling the mutate function from the useMutation hook.
#128995352c12 Thanks @phryneas! - Fix an issue when invariant is called by external libraries when no dev error message handler is loaded.
#1289571f2517 Thanks @jerelmiller! - Support skipToken with useQuery to provide a more type-safe way to skip query execution.
import{skipToken,useQuery}from"@​apollo/client/react";// Use `skipToken` in place of `skip: true` for better type safety
// for required variables
const{data}=useQuery(QUERY,id?{variables:{id}}:skipToken);
Note: this change is provided as a patch within the 4.0 minor version because the changes to TypeScript validation with required variables in version 4.0 made using the skip option more difficult.
#12900c0d5be7 Thanks @phryneas! - Use named export equal instead of default from "@​wry/equality"
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@apollo/client](https://www.apollographql.com/docs/react/) ([source](https://github.com/apollographql/apollo-client)) | [`3.14.1` → `4.1.6`](https://renovatebot.com/diffs/npm/@apollo%2fclient/3.14.1/4.1.6) |  |  |
---
### Release Notes
<details>
<summary>apollographql/apollo-client (@​apollo/client)</summary>
### [`v4.1.6`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#416)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.1.5...@apollo/client@4.1.6)
##### Patch Changes
- [#​13128](https://github.com/apollographql/apollo-client/pull/13128) [`6c0b8e4`](https://github.com/apollographql/apollo-client/commit/6c0b8e4301609b62ed599340589c978e4f51f020) Thanks [@​pavelivanov](https://github.com/pavelivanov)! - Fix `useQuery` hydration mismatch when `ssr: false` and `skip: true` are used together
When both options were combined, the server would return `loading: false` (because `useSSRQuery` checks `skip` first), but the client's `getServerSnapshot` was returning `ssrDisabledResult` with `loading: true`, causing a hydration mismatch.
### [`v4.1.5`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#415)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.1.4...@apollo/client@4.1.5)
##### Patch Changes
- [#​13155](https://github.com/apollographql/apollo-client/pull/13155) [`3ba1583`](https://github.com/apollographql/apollo-client/commit/3ba1583f93c40343501acd9d598ce506537d1c9b) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix an issue where `useQuery` would poll with `pollInterval` when `skip` was initialized to `true`.
- [#​13135](https://github.com/apollographql/apollo-client/pull/13135) [`fd42142`](https://github.com/apollographql/apollo-client/commit/fd42142495d24859a9bc7145a85bc8f8d857ec88) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix issue where `client.query` would apply options from `defaultOptions.watchQuery`.
### [`v4.1.4`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#414)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.1.3...@apollo/client@4.1.4)
##### Patch Changes
- [#​13124](https://github.com/apollographql/apollo-client/pull/13124) [`578081f`](https://github.com/apollographql/apollo-client/commit/578081f2da7f2f54c0dd2711ee4a97530a5c38fc) Thanks [@​Re-cool](https://github.com/Re-cool)! - Ensure `PersistedQueryLink` merges `http` and `fetchOptions` context values instead of overwriting them.
### [`v4.1.3`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#413)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.1.2...@apollo/client@4.1.3)
##### Patch Changes
- [#​13111](https://github.com/apollographql/apollo-client/pull/13111) [`bf46fe0`](https://github.com/apollographql/apollo-client/commit/bf46fe019b316ea8a87a05981a89fac5411260b4) Thanks [@​RogerHYang](https://github.com/RogerHYang)! - Fix `createFetchMultipartSubscription` to support cancellation via `AbortController`
Previously, calling `dispose()` or `unsubscribe()` on a subscription created by `createFetchMultipartSubscription` had no effect - the underlying fetch request would continue running until completion. This was because no `AbortController` was created or passed to `fetch()`, and no cleanup function was returned from the Observable.
### [`v4.1.2`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#412)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.1.1...@apollo/client@4.1.2)
##### Patch Changes
- [#​13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@​phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` or `prioritizeCacheValues` should not override `fetchPolicy: 'cache-only'`, `fetchPolicy: 'no-cache'`, `fetchPolicy: 'standby'`, `skip: true`, or `skipToken` when reading the initial value of an `ObservableQuery`.
- [#​13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@​phryneas](https://github.com/phryneas)! - Fix `skipToken` in `useQuery` with `prerenderStatic` and related SSR functions.
- [#​13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@​phryneas](https://github.com/phryneas)! - Avoid fetches with `fetchPolicy: no-cache` in `useQuery` with `prerenderStatic` and related SSR functions.
### [`v4.1.1`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#411)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.1.0...@apollo/client@4.1.1)
##### Patch Changes
- [#​13103](https://github.com/apollographql/apollo-client/pull/13103) [`dee7dcf`](https://github.com/apollographql/apollo-client/commit/dee7dcff4d4baa26d623d1ecace60be88c684c1a) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Ensure `@client` fields that are children of aliased server fields are resolved correctly.
### [`v4.1.0`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#410)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.13...@apollo/client@4.1.0)
##### Minor Changes
- [#​13043](https://github.com/apollographql/apollo-client/pull/13043) [`65e66ca`](https://github.com/apollographql/apollo-client/commit/65e66cafb6828b63d14b64877bbad47af95f66e4) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Support `headers` transport for enhanced client awareness.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`785e223`](https://github.com/apollographql/apollo-client/commit/785e2232b4f7d9e561611cd4f45b8fdd1e44319e) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - You can now provide a callback function as the `context` option on the `mutate` function returned by `useMutation`. The callback function is called with the value of the `context` option provided to the `useMutation` hook. This is useful if you'd like to merge the context object provided to the `useMutation` hook with a value provided to the `mutate` function.
```ts
function MyComponent() {
const [mutate, result] = useMutation(MUTATION, {
context: { foo: true },
});
async function runMutation() {
await mutate({
// sends context as { foo: true, bar: true }
context: (hookContext) => ({ ...hookContext, bar: true }),
});
}
// ...
}
```
- [#​12923](https://github.com/apollographql/apollo-client/pull/12923) [`94ea3e3`](https://github.com/apollographql/apollo-client/commit/94ea3e32c82dd767b62a6907be6c3891864633af) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix an issue where deferred payloads that returned arrays with fewer items than the original cached array would retain items from the cached array. This change includes `@stream` arrays where stream arrays replace the cached arrays.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Don't set the fallback value of a `@client` field to `null` when a `read` function is defined. Instead the `read` function will be called with an `existing` value of `undefined` to allow default arguments to be used to set the returned value.
When a `read` function is not defined nor is there a defined resolver for the field, warn and set the value to `null` only in that instance.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add support for `from: null` in `client.watchFragment` and `cache.watchFragment`. When `from` is `null`, the emitted result is:
```ts
{
data: null,
dataState: "complete",
complete: true,
}
```
- [#​12926](https://github.com/apollographql/apollo-client/pull/12926) [`2b7f2c1`](https://github.com/apollographql/apollo-client/commit/2b7f2c167fc4a94e06457777f0c57b6dac7b2f2f) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Support the newer incremental delivery format for the `@defer` directive implemented in `graphql@17.0.0-alpha.9`. Import the `GraphQL17Alpha9Handler` to use the newer incremental delivery format with `@defer`.
```ts
import { GraphQL17Alpha9Handler } from "@​apollo/client/incremental";
const client = new ApolloClient({
// ...
incrementalHandler: new GraphQL17Alpha9Handler(),
});
```
> \[!NOTE]
> In order to use the `GraphQL17Alpha9Handler`, the GraphQL server MUST implement the newer incremental delivery format. You may see errors or unusual behavior if you use the wrong handler. If you are using Apollo Router, continue to use the `Defer20220824Handler` because Apollo Router does not yet support the newer incremental delivery format.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add support for arrays with `useFragment`, `useSuspenseFragment`, and `client.watchFragment`. This allows the ability to use a fragment to watch multiple entities in the cache. Passing an array to `from` will return `data` as an array where each array index corresponds to the index in the `from` array.
```ts
function MyComponent() {
const result = useFragment({
fragment,
from: [item1, item2, item3],
});
// `data` is an array with 3 items
console.log(result); // { data: [{...}, {...}, {...}], dataState: "complete", complete: true }
}
```
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add a `getCurrentResult` function to the observable returned by `client.watchFragment` and `cache.watchFragment` that returns the current value for the watched fragment.
```ts
const observable = client.watchFragment({
fragment,
from: { __typename: "Item", id: 1 },
});
console.log(observable.getCurrentResult());
// {
// data: {...},
// dataState: "complete",
// complete: true,
// }
```
- [#​13038](https://github.com/apollographql/apollo-client/pull/13038) [`109efe7`](https://github.com/apollographql/apollo-client/commit/109efe7e4380b579c6a577982bd9a6e8c6a53892) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add the `from` option to `readFragment`, `watchFragment`, and `updateFragment`.
- [#​12918](https://github.com/apollographql/apollo-client/pull/12918) [`2e224b9`](https://github.com/apollographql/apollo-client/commit/2e224b99894432822f926fdfec36bd46dd73b35e) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add support for the `@stream` directive on both the `Defer20220824Handler` and the `GraphQL17Alpha2Handler`.
> \[!NOTE]
> The implementations of `@stream` differ in the delivery of incremental results between the different GraphQL spec versions. If you upgrading from the older format to the newer format, expect the timing of some incremental results to change.
- [#​13056](https://github.com/apollographql/apollo-client/pull/13056) [`b224efc`](https://github.com/apollographql/apollo-client/commit/b224efc25515370c68b514405762e68a443e4a4a) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - `InMemoryCache` no longer filters out explicitly returned `undefined` items from `read` functions for array fields. This now makes it possible to create `read` functions on array fields that return partial data and trigger a fetch for the full list.
- [#​13058](https://github.com/apollographql/apollo-client/pull/13058) [`121a2cb`](https://github.com/apollographql/apollo-client/commit/121a2cb68820727186ecd74ce1041ef95284682e) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add an `extensions` option to `cache.write`, `cache.writeQuery`, and `client.writeQuery`. This makes `extensions` available in cache `merge` functions which can be accessed with the other merge function options.
As a result of this change, any `extensions` returned in GraphQL operations are now available in `merge` in the cache writes for these operations.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add an abstract `resolvesClientField` function to `ApolloCache` that can be used by caches to tell `LocalState` if it can resolve a `@client` field when a local resolver is not defined.
`LocalState` will emit a warning and set a fallback value of `null` when no local resolver is defined and `resolvesClientField` returns `false`, or isn't defined. Returning `true` from `resolvesClientField` signals that a mechanism in the cache will set the field value. In this case, `LocalState` won't set the field value.
- [#​13078](https://github.com/apollographql/apollo-client/pull/13078) [`bf1e0dc`](https://github.com/apollographql/apollo-client/commit/bf1e0dcb2f6c9b94576dc6d049745f1869cd0043) Thanks [@​phryneas](https://github.com/phryneas)! - Use the default stream merge function for `@stream` fields only if stream info is present. This change means that using the older `Defer20220824Handler` will not use the default stream merge function and will instead truncate the streamed array on the first chunk.
##### Patch Changes
- [#​12884](https://github.com/apollographql/apollo-client/pull/12884) [`d329790`](https://github.com/apollographql/apollo-client/commit/d32979070381f1897c90fb276e25a0c8375cc29a) Thanks [@​phryneas](https://github.com/phryneas)! - Ensure that `PreloadedQueryRef` instances are unsubscribed when garbage collected
- [#​13086](https://github.com/apollographql/apollo-client/pull/13086) [`1a1d408`](https://github.com/apollographql/apollo-client/commit/1a1d4088f549088d4af3ff1f2d08d1c8e9af2a4d) Thanks [@​phryneas](https://github.com/phryneas)! - Change the returned value from `null` to `{}` when all fields in a query were skipped.
This also fixes a bug where `useSuspenseQuery` would suspend indefinitely when all fields were skipped.
- [#​13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix an issue where errors parsed from incremental chunks in `ErrorLink` might throw when using the `GraphQL17Alpha9Handler`.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Deduplicate watches created by `useFragment`, `client.watchFragment`, and `cache.watchFragment` that contain the same fragment, variables, and identifier. This should improve performance in situations where a `useFragment` or a `client.watchFragment` is used to watch the same object in multiple places of an application.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`259ae9b`](https://github.com/apollographql/apollo-client/commit/259ae9bafaa8122996b0a52dd99828b2261087e5) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Allow `FragmentType` not only to be called as `FragmentType<TData>`, but also as `FragmentType<TypedDocumentNode>`.
- [#​12925](https://github.com/apollographql/apollo-client/pull/12925) [`5851800`](https://github.com/apollographql/apollo-client/commit/58518000edebb2a4b75c36ed22e9b67b3a254fa0) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix an issue where calling `fetchMore` with `@defer` or `@stream` would not rerender incremental results as they were streamed.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`9e55188`](https://github.com/apollographql/apollo-client/commit/9e55188adcb4cf4236b14eb552286a4505650a29) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Truncate `@stream` arrays only on last chunk by default.
- [#​13083](https://github.com/apollographql/apollo-client/pull/13083) [`f3c2be1`](https://github.com/apollographql/apollo-client/commit/f3c2be1665d8e2e260a4f55ec803d6e609748390) Thanks [@​phryneas](https://github.com/phryneas)! - Expose the `ExtensionsWithStreamInfo` type for `extensions` in `Cache.writeQuery`, `Cache.write` and `Cache.update` so other cache implementations also can correctly access them.
- [#​12923](https://github.com/apollographql/apollo-client/pull/12923) [`94ea3e3`](https://github.com/apollographql/apollo-client/commit/94ea3e32c82dd767b62a6907be6c3891864633af) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Improve the cache data loss warning message when `existing` or `incoming` is an array.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`4631175`](https://github.com/apollographql/apollo-client/commit/46311758f703ec7baa9013a49b897e823fd4edb0) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Ignore top-level `data` values on subsequent chunks in incremental responses.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`2be8de2`](https://github.com/apollographql/apollo-client/commit/2be8de26f1bb68d2d6cd0d286565d47455332b47) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Create mechanism to add experimental features to Apollo Client
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Ensure `LocalState` doesn't try to read from the cache when using a `no-cache` fetch policy.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`bb8ed7b`](https://github.com/apollographql/apollo-client/commit/bb8ed7b6b7e36e313822e44b230e27031d6fcbd9) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Ensure an error is thrown when `@stream` is detected and an `incrementalDelivery` handler is not configured.
- [#​13053](https://github.com/apollographql/apollo-client/pull/13053) [`23ca0ba`](https://github.com/apollographql/apollo-client/commit/23ca0ba895473b397805e6bcc70e0fcf987547c5) Thanks [@​phryneas](https://github.com/phryneas)! - Use memoized observable mapping when using `watchFragment`, `useFragment` or `useSuspenseFragment`.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`44706a2`](https://github.com/apollographql/apollo-client/commit/44706a2e7ae2c977fa917214a1ff5e5fe4a9b3a7) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Add helper type `QueryRef.ForQuery<TypedDocumentNode>`
- [#​13082](https://github.com/apollographql/apollo-client/pull/13082) [`c257418`](https://github.com/apollographql/apollo-client/commit/c2574181f6b0d9ae059dfa3822a7842ec5f8ff1f) Thanks [@​phryneas](https://github.com/phryneas)! - Pass `streamInfo` through result extensions as a `WeakRef`.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`4631175`](https://github.com/apollographql/apollo-client/commit/46311758f703ec7baa9013a49b897e823fd4edb0) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix the `Defer20220824Handler.SubsequentResult` type to match the `FormattedSubsequentIncrementalExecutionResult` type in `graphql@17.0.0-alpha.2`.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Warn when using a `no-cache` fetch policy without a local resolver defined. `no-cache` queries do not read or write to the cache which meant `no-cache` queries are silently incomplete when the `@client` field value was handled by a cache `read` function.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`5776ea0`](https://github.com/apollographql/apollo-client/commit/5776ea0db1f082663dcf470c3b22b9182a3eea28) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Update the `accept` header used with the `GraphQL17Alpha9Handler` to `multipart/mixed;incrementalSpec=v0.2` to ensure the newest incremental delivery format is requested.
- [#​12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - `DeepPartial<Array<TData>>` now returns `Array<DeepPartial<TData>>` instead of `Array<DeepPartial<TData | undefined>>`.
- [#​13071](https://github.com/apollographql/apollo-client/pull/13071) [`99ffe9a`](https://github.com/apollographql/apollo-client/commit/99ffe9a8ede1683d902101c5371807a8442fcdcb) Thanks [@​phryneas](https://github.com/phryneas)! - `prerenderStatic`: Expose return value of `renderFunction` to userland, fix `aborted` property.
This enables usage of `resumeAndPrerender` with React 19.2.
- [#​13026](https://github.com/apollographql/apollo-client/pull/13026) [`05eee67`](https://github.com/apollographql/apollo-client/commit/05eee67e91b480252923879987534e81d2866aba) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Reduce the number of observables created by `watchFragment` by reusing existing observables as much as possible. This should improve performance when watching the same item in the cache multiple times after a cache update occurs.
- [#​13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Handle `@stream` payloads that send multiple items in the same chunk when using the `Defer20220824Handler`.
- [#​13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Handle an edge case with the `Defer20220824Handler` where an error for a `@stream` item that bubbles to the `@stream` boundary (such as an item returning `null` for a non-null array item) would write items from future chunks to the wrong array index. In these cases, the `@stream` field is no longer processed and future updates to the field are ignored. This prevents runtime errors that TypeScript would otherwise not be able to catch.
- [#​13081](https://github.com/apollographql/apollo-client/pull/13081) [`1e06ad7`](https://github.com/apollographql/apollo-client/commit/1e06ad7399716139fcfbec7423697eafc5750f5e) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Avoid calling `merge` functions more than once for the same incremental chunk.
### [`v4.0.13`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#4013)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.12...@apollo/client@4.0.13)
##### Patch Changes
- [#​13094](https://github.com/apollographql/apollo-client/pull/13094) [`9cbe2c2`](https://github.com/apollographql/apollo-client/commit/9cbe2c2dd2282ac861327d3c394578db7706df05) Thanks [@​phryneas](https://github.com/phryneas)! - Ensure that `compact` and `mergeOptions` preserve symbol keys.
This fixes an issue where the change introduced in 4.0.11 via [#​13049](https://github.com/apollographql/apollo-client/issues/13049) would not
be applied if `defaultOptions` for `watchQuery` were declared.
Please note that `compact` and `mergeOptions` are considered internal utilities
and they might have similar behavior changes in future releases.
Do not use them in your application code - a change like this is not considered
breaking and will not be announced as such.
### [`v4.0.12`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#4012-beta0)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.11...@apollo/client@4.0.12)
##### Patch Changes
- [#​12884](https://github.com/apollographql/apollo-client/pull/12884) [`d329790`](https://github.com/apollographql/apollo-client/commit/d32979070381f1897c90fb276e25a0c8375cc29a) Thanks [@​phryneas](https://github.com/phryneas)! - Ensure that `PreloadedQueryRef` instances are unsubscribed when garbage collected
- [#​13069](https://github.com/apollographql/apollo-client/pull/13069) [`9cad04a`](https://github.com/apollographql/apollo-client/commit/9cad04a4228a5059ea330ac9d284407a363fc10d) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Truncate [@​stream](https://github.com/stream) arrays only on last chunk by default
### [`v4.0.11`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#4011)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.10...@apollo/client@4.0.11)
##### Patch Changes
- [#​13050](https://github.com/apollographql/apollo-client/pull/13050) [`8020829`](https://github.com/apollographql/apollo-client/commit/8020829d8a3bdb3219a37e8d1f7b89179f721037) Thanks [@​phryneas](https://github.com/phryneas)! - Replace usage of `findLast` with more backwards-compatible methods.
- [#​13049](https://github.com/apollographql/apollo-client/pull/13049) [`05638de`](https://github.com/apollographql/apollo-client/commit/05638deaf598c5bf5d03b82d7deaf57468546229) Thanks [@​phryneas](https://github.com/phryneas)! - Fixes an issue where queries starting with `skipToken` or lazy queries from `useLazyQuery` were included in `client.refetchQueries()` before they had been executed for the first time. While generally queries with a `standby` `fetchPolicy` should be included in refetch, these queries never had `variables` passed in, so they should be excluded until they have run once and received their actual variables.
These queries are now properly excluded from refetch operations until after their initial execution.
This change adds a new hidden option to `client.watchQuery`, `[variablesUnknownSymbol]`, which may be set `true` for queries starting with a `fetchPolicy` of `standby`. It will only be applied when creating the `ObservableQuery` instance and cannot be changed later. This flag indicates that the query's variables are not yet known, and thus it should be excluded from refetch operations until they are.
**This option is not meant for everyday use and is intended for framework integrations only.**
### [`v4.0.10`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#4010)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.9...@apollo/client@4.0.10)
##### Patch Changes
- [#​13045](https://github.com/apollographql/apollo-client/pull/13045) [`af4acdc`](https://github.com/apollographql/apollo-client/commit/af4acdc88bd3bac0d697ab300816241e4065842c) Thanks [@​phryneas](https://github.com/phryneas)! - Fix memory leak [#​13036](https://github.com/apollographql/apollo-client/issues/13036)
### [`v4.0.9`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#409)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.8...@apollo/client@4.0.9)
##### Patch Changes
- [#​12993](https://github.com/apollographql/apollo-client/pull/12993) [`8f3bc9b`](https://github.com/apollographql/apollo-client/commit/8f3bc9b7253a737062dc0d652cd4f8b354f68ccc) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Fix an issue where switching from options with `variables` to `skipToken` with `useSuspenseQuery` and `useBackgroundQuery` would create a new `ObservableQuery`. This could cause unintended refetches where `variables` were absent in the request when the query was referenced with `refetchQueries`.
### [`v4.0.8`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#408)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.7...@apollo/client@4.0.8)
##### Patch Changes
- [#​12983](https://github.com/apollographql/apollo-client/pull/12983) [`f6d0efa`](https://github.com/apollographql/apollo-client/commit/f6d0efac4d99375c67255aee6d9b2981753b6f55) Thanks [@​CarsonF](https://github.com/CarsonF)! - Fix cache.modify() mapping readonly arrays to singular reference
### [`v4.0.7`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#407)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.6...@apollo/client@4.0.7)
##### Patch Changes
- [#​12950](https://github.com/apollographql/apollo-client/pull/12950) [`5b4f36a`](https://github.com/apollographql/apollo-client/commit/5b4f36a2b249d15e2e8165bd32d9b2fca7e70217) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Don't send `operationType` in the payload sent by `GraphQLWsLink`.
### [`v4.0.6`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#406)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.5...@apollo/client@4.0.6)
##### Patch Changes
- [#​12937](https://github.com/apollographql/apollo-client/pull/12937) [`3b0d89b`](https://github.com/apollographql/apollo-client/commit/3b0d89bc9dde3eaee9ddf0aec387da43fe71abc0) Thanks [@​phryneas](https://github.com/phryneas)! - Fix a problem with `fetchMore` where the loading state wouldn't reset if the result wouldn't result in a data update.
### [`v4.0.5`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#405)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.4...@apollo/client@4.0.5)
##### Patch Changes
- [#​12920](https://github.com/apollographql/apollo-client/pull/12920) [`e2fc385`](https://github.com/apollographql/apollo-client/commit/e2fc3850ddb2aa756fc44420390ae357daf31948) Thanks [@​phryneas](https://github.com/phryneas)! - Fix an invariance type error in the `MockedResponse` type.
### [`v4.0.4`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#404)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.3...@apollo/client@4.0.4)
##### Patch Changes
- [#​12892](https://github.com/apollographql/apollo-client/pull/12892) [`db8a04b`](https://github.com/apollographql/apollo-client/commit/db8a04b193c157d57d6fe0f187b1892afdda1b7d) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Prevent unhandled rejections from the promise returned by calling the `mutate` function from the `useMutation` hook.
- [#​12899](https://github.com/apollographql/apollo-client/pull/12899) [`5352c12`](https://github.com/apollographql/apollo-client/commit/5352c1208e19c93678fef7860a1a87841653eb64) Thanks [@​phryneas](https://github.com/phryneas)! - Fix an issue when `invariant` is called by external libraries when no dev error message handler is loaded.
- [#​12895](https://github.com/apollographql/apollo-client/pull/12895) [`71f2517`](https://github.com/apollographql/apollo-client/commit/71f2517132a34563a14934f3971666b3691710f9) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Support `skipToken` with `useQuery` to provide a more type-safe way to skip query execution.
```ts
import { skipToken, useQuery } from "@​apollo/client/react";
// Use `skipToken` in place of `skip: true` for better type safety
// for required variables
const { data } = useQuery(QUERY, id ? { variables: { id } } : skipToken);
```
Note: this change is provided as a patch within the 4.0 minor version because the changes to TypeScript validation with required variables in version 4.0 made using the `skip` option more difficult.
- [#​12900](https://github.com/apollographql/apollo-client/pull/12900) [`c0d5be7`](https://github.com/apollographql/apollo-client/commit/c0d5be7cbbb1b1f7771962eb2ae0e173de743265) Thanks [@​phryneas](https://github.com/phryneas)! - Use named export `equal` instead of default from `"@​wry/equality"`
### [`v4.0.3`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#403)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.2...@apollo/client@4.0.3)
##### Patch Changes
- [#​12887](https://github.com/apollographql/apollo-client/pull/12887) [`6f6ca47`](https://github.com/apollographql/apollo-client/commit/6f6ca47e9f5e80ee9c98fca2639b5cba6317fbbf) Thanks [@​phryneas](https://github.com/phryneas)! - Fix accidental deep re-export from `/react` out of `/react/internals`
- [#​12890](https://github.com/apollographql/apollo-client/pull/12890) [`019b422`](https://github.com/apollographql/apollo-client/commit/019b4224147a5a8709de54c4474e126619dd2469) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Ensure the `variables` option for `useMutation` provides proper IntelliSense suggestions.
### [`v4.0.2`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#402)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.1...@apollo/client@4.0.2)
##### Patch Changes
- [#​12880](https://github.com/apollographql/apollo-client/pull/12880) [`56fac52`](https://github.com/apollographql/apollo-client/commit/56fac522549eaed5494097dc0098ea7a558382a0) Thanks [@​phryneas](https://github.com/phryneas)! - restore `getMemoryInternals` access in dev builds
### [`v4.0.1`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#4012-beta0)
[Compare Source](https://github.com/apollographql/apollo-client/compare/@apollo/client@4.0.0...@apollo/client@4.0.1)
##### Patch Changes
- [#​12884](https://github.com/apollographql/apollo-client/pull/12884) [`d329790`](https://github.com/apollographql/apollo-client/commit/d32979070381f1897c90fb276e25a0c8375cc29a) Thanks [@​phryneas](https://github.com/phryneas)! - Ensure that `PreloadedQueryRef` instances are unsubscribed when garbage collected
- [#​13069](https://github.com/apollographql/apollo-client/pull/13069) [`9cad04a`](https://github.com/apollographql/apollo-client/commit/9cad04a4228a5059ea330ac9d284407a363fc10d) Thanks [@​jerelmiller](https://github.com/jerelmiller)! - Truncate [@​stream](https://github.com/stream) arrays only on last chunk by default
### [`v4.0.0`](https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#400)
[Compare Source](https://github.com/apollographql/apollo-client/compare/v3.14.1...@apollo/client@4.0.0)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NC42IiwidXBkYXRlZEluVmVyIjoiNDMuNTkuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm.
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @eslint/config-inspector@1.4.2
npm warn Found: eslint@10.0.3
npm warn node_modules/eslint
npm warn dev eslint@"10.0.3" from the root project
npm warn 23 more (@eslint-community/eslint-utils, @eslint/compat, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer eslint@"^8.50.0 || ^9.0.0" from @eslint/config-inspector@1.4.2
npm warn node_modules/@eslint/config-inspector
npm warn @eslint/config-inspector@"^1.4.2" from @nuxt/eslint@1.15.2
npm warn node_modules/@nuxt/eslint
npm warn
npm warn Conflicting peer dependency: eslint@9.39.4
npm warn node_modules/eslint
npm warn peer eslint@"^8.50.0 || ^9.0.0" from @eslint/config-inspector@1.4.2
npm warn node_modules/@eslint/config-inspector
npm warn @eslint/config-inspector@"^1.4.2" from @nuxt/eslint@1.15.2
npm warn node_modules/@nuxt/eslint
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @vue/apollo-composable@4.2.2
npm error Found: @apollo/client@4.1.6
npm error node_modules/@apollo/client
npm error @apollo/client@"4.1.6" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @apollo/client@"^3.4.13" from @vue/apollo-composable@4.2.2
npm error node_modules/@vue/apollo-composable
npm error @vue/apollo-composable@"4.2.2" from the root project
npm error
npm error Conflicting peer dependency: @apollo/client@3.14.1
npm error node_modules/@apollo/client
npm error peer @apollo/client@"^3.4.13" from @vue/apollo-composable@4.2.2
npm error node_modules/@vue/apollo-composable
npm error @vue/apollo-composable@"4.2.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2026-03-12T23_02_50_033Z-eresolve-report.txt
npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2026-03-12T23_02_50_033Z-debug-0.log
### ⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
- any of the package files in this branch needs updating, or
- the branch becomes conflicted, or
- you click the rebase/retry checkbox if found above, or
- you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
##### File name: package-lock.json
```
npm warn Unknown env config "store". This will stop working in the next major version of npm.
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @eslint/config-inspector@1.4.2
npm warn Found: eslint@10.0.3
npm warn node_modules/eslint
npm warn dev eslint@"10.0.3" from the root project
npm warn 23 more (@eslint-community/eslint-utils, @eslint/compat, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer eslint@"^8.50.0 || ^9.0.0" from @eslint/config-inspector@1.4.2
npm warn node_modules/@eslint/config-inspector
npm warn @eslint/config-inspector@"^1.4.2" from @nuxt/eslint@1.15.2
npm warn node_modules/@nuxt/eslint
npm warn
npm warn Conflicting peer dependency: eslint@9.39.4
npm warn node_modules/eslint
npm warn peer eslint@"^8.50.0 || ^9.0.0" from @eslint/config-inspector@1.4.2
npm warn node_modules/@eslint/config-inspector
npm warn @eslint/config-inspector@"^1.4.2" from @nuxt/eslint@1.15.2
npm warn node_modules/@nuxt/eslint
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @vue/apollo-composable@4.2.2
npm error Found: @apollo/client@4.1.6
npm error node_modules/@apollo/client
npm error @apollo/client@"4.1.6" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @apollo/client@"^3.4.13" from @vue/apollo-composable@4.2.2
npm error node_modules/@vue/apollo-composable
npm error @vue/apollo-composable@"4.2.2" from the root project
npm error
npm error Conflicting peer dependency: @apollo/client@3.14.1
npm error node_modules/@apollo/client
npm error peer @apollo/client@"^3.4.13" from @vue/apollo-composable@4.2.2
npm error node_modules/@vue/apollo-composable
npm error @vue/apollo-composable@"4.2.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2026-03-12T23_02_50_033Z-eresolve-report.txt
npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2026-03-12T23_02_50_033Z-debug-0.log
```
Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 4.x releases. But if you manually upgrade to 4.x then Renovate will re-enable minor and patch updates automatically.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
### Renovate Ignore Notification
Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for *any* future `4.x` releases. But if you manually upgrade to `4.x` then Renovate will re-enable `minor` and `patch` updates automatically.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
Pull request closed
Please reopen this pull request to perform a merge.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
3.14.1→4.1.6Release Notes
apollographql/apollo-client (@apollo/client)
v4.1.6Compare Source
Patch Changes
#13128
6c0b8e4Thanks @pavelivanov! - FixuseQueryhydration mismatch whenssr: falseandskip: trueare used togetherWhen both options were combined, the server would return
loading: false(becauseuseSSRQuerychecksskipfirst), but the client'sgetServerSnapshotwas returningssrDisabledResultwithloading: true, causing a hydration mismatch.v4.1.5Compare Source
Patch Changes
#13155
3ba1583Thanks @jerelmiller! - Fix an issue whereuseQuerywould poll withpollIntervalwhenskipwas initialized totrue.#13135
fd42142Thanks @jerelmiller! - Fix issue whereclient.querywould apply options fromdefaultOptions.watchQuery.v4.1.4Compare Source
Patch Changes
578081fThanks @Re-cool! - EnsurePersistedQueryLinkmergeshttpandfetchOptionscontext values instead of overwriting them.v4.1.3Compare Source
Patch Changes
#13111
bf46fe0Thanks @RogerHYang! - FixcreateFetchMultipartSubscriptionto support cancellation viaAbortControllerPreviously, calling
dispose()orunsubscribe()on a subscription created bycreateFetchMultipartSubscriptionhad no effect - the underlying fetch request would continue running until completion. This was because noAbortControllerwas created or passed tofetch(), and no cleanup function was returned from the Observable.v4.1.2Compare Source
Patch Changes
#13105
8b62263Thanks @phryneas! -ssrMode,ssrForceFetchDelayorprioritizeCacheValuesshould not overridefetchPolicy: 'cache-only',fetchPolicy: 'no-cache',fetchPolicy: 'standby',skip: true, orskipTokenwhen reading the initial value of anObservableQuery.#13105
8b62263Thanks @phryneas! - FixskipTokeninuseQuerywithprerenderStaticand related SSR functions.#13105
8b62263Thanks @phryneas! - Avoid fetches withfetchPolicy: no-cacheinuseQuerywithprerenderStaticand related SSR functions.v4.1.1Compare Source
Patch Changes
dee7dcfThanks @jerelmiller! - Ensure@clientfields that are children of aliased server fields are resolved correctly.v4.1.0Compare Source
Minor Changes
#13043
65e66caThanks @jerelmiller! - Supportheaderstransport for enhanced client awareness.#12927
785e223Thanks @jerelmiller! - You can now provide a callback function as thecontextoption on themutatefunction returned byuseMutation. The callback function is called with the value of thecontextoption provided to theuseMutationhook. This is useful if you'd like to merge the context object provided to theuseMutationhook with a value provided to themutatefunction.#12923
94ea3e3Thanks @jerelmiller! - Fix an issue where deferred payloads that returned arrays with fewer items than the original cached array would retain items from the cached array. This change includes@streamarrays where stream arrays replace the cached arrays.#12927
96b531fThanks @jerelmiller! - Don't set the fallback value of a@clientfield tonullwhen areadfunction is defined. Instead thereadfunction will be called with anexistingvalue ofundefinedto allow default arguments to be used to set the returned value.When a
readfunction is not defined nor is there a defined resolver for the field, warn and set the value tonullonly in that instance.#12927
45ebb52Thanks @jerelmiller! - Add support forfrom: nullinclient.watchFragmentandcache.watchFragment. Whenfromisnull, the emitted result is:#12926
2b7f2c1Thanks @jerelmiller! - Support the newer incremental delivery format for the@deferdirective implemented ingraphql@17.0.0-alpha.9. Import theGraphQL17Alpha9Handlerto use the newer incremental delivery format with@defer.#12927
45ebb52Thanks @jerelmiller! - Add support for arrays withuseFragment,useSuspenseFragment, andclient.watchFragment. This allows the ability to use a fragment to watch multiple entities in the cache. Passing an array tofromwill returndataas an array where each array index corresponds to the index in thefromarray.#12927
45ebb52Thanks @jerelmiller! - Add agetCurrentResultfunction to the observable returned byclient.watchFragmentandcache.watchFragmentthat returns the current value for the watched fragment.#13038
109efe7Thanks @jerelmiller! - Add thefromoption toreadFragment,watchFragment, andupdateFragment.#12918
2e224b9Thanks @jerelmiller! - Add support for the@streamdirective on both theDefer20220824Handlerand theGraphQL17Alpha2Handler.#13056
b224efcThanks @jerelmiller! -InMemoryCacheno longer filters out explicitly returnedundefineditems fromreadfunctions for array fields. This now makes it possible to createreadfunctions on array fields that return partial data and trigger a fetch for the full list.#13058
121a2cbThanks @jerelmiller! - Add anextensionsoption tocache.write,cache.writeQuery, andclient.writeQuery. This makesextensionsavailable in cachemergefunctions which can be accessed with the other merge function options.As a result of this change, any
extensionsreturned in GraphQL operations are now available inmergein the cache writes for these operations.#12927
96b531fThanks @jerelmiller! - Add an abstractresolvesClientFieldfunction toApolloCachethat can be used by caches to tellLocalStateif it can resolve a@clientfield when a local resolver is not defined.LocalStatewill emit a warning and set a fallback value ofnullwhen no local resolver is defined andresolvesClientFieldreturnsfalse, or isn't defined. ReturningtruefromresolvesClientFieldsignals that a mechanism in the cache will set the field value. In this case,LocalStatewon't set the field value.#13078
bf1e0dcThanks @phryneas! - Use the default stream merge function for@streamfields only if stream info is present. This change means that using the olderDefer20220824Handlerwill not use the default stream merge function and will instead truncate the streamed array on the first chunk.Patch Changes
#12884
d329790Thanks @phryneas! - Ensure thatPreloadedQueryRefinstances are unsubscribed when garbage collected#13086
1a1d408Thanks @phryneas! - Change the returned value fromnullto{}when all fields in a query were skipped.This also fixes a bug where
useSuspenseQuerywould suspend indefinitely when all fields were skipped.#13010
7627000Thanks @jerelmiller! - Fix an issue where errors parsed from incremental chunks inErrorLinkmight throw when using theGraphQL17Alpha9Handler.#12927
45ebb52Thanks @jerelmiller! - Deduplicate watches created byuseFragment,client.watchFragment, andcache.watchFragmentthat contain the same fragment, variables, and identifier. This should improve performance in situations where auseFragmentor aclient.watchFragmentis used to watch the same object in multiple places of an application.#12927
259ae9bThanks @jerelmiller! - AllowFragmentTypenot only to be called asFragmentType<TData>, but also asFragmentType<TypedDocumentNode>.#12925
5851800Thanks @jerelmiller! - Fix an issue where callingfetchMorewith@deferor@streamwould not rerender incremental results as they were streamed.#12927
9e55188Thanks @jerelmiller! - Truncate@streamarrays only on last chunk by default.#13083
f3c2be1Thanks @phryneas! - Expose theExtensionsWithStreamInfotype forextensionsinCache.writeQuery,Cache.writeandCache.updateso other cache implementations also can correctly access them.#12923
94ea3e3Thanks @jerelmiller! - Improve the cache data loss warning message whenexistingorincomingis an array.#12927
4631175Thanks @jerelmiller! - Ignore top-leveldatavalues on subsequent chunks in incremental responses.#12927
2be8de2Thanks @jerelmiller! - Create mechanism to add experimental features to Apollo Client#12927
96b531fThanks @jerelmiller! - EnsureLocalStatedoesn't try to read from the cache when using ano-cachefetch policy.#12927
bb8ed7bThanks @jerelmiller! - Ensure an error is thrown when@streamis detected and anincrementalDeliveryhandler is not configured.#13053
23ca0baThanks @phryneas! - Use memoized observable mapping when usingwatchFragment,useFragmentoruseSuspenseFragment.#12927
44706a2Thanks @jerelmiller! - Add helper typeQueryRef.ForQuery<TypedDocumentNode>#13082
c257418Thanks @phryneas! - PassstreamInfothrough result extensions as aWeakRef.#12927
4631175Thanks @jerelmiller! - Fix theDefer20220824Handler.SubsequentResulttype to match theFormattedSubsequentIncrementalExecutionResulttype ingraphql@17.0.0-alpha.2.#12927
96b531fThanks @jerelmiller! - Warn when using ano-cachefetch policy without a local resolver defined.no-cachequeries do not read or write to the cache which meantno-cachequeries are silently incomplete when the@clientfield value was handled by a cachereadfunction.#12927
5776ea0Thanks @jerelmiller! - Update theacceptheader used with theGraphQL17Alpha9Handlertomultipart/mixed;incrementalSpec=v0.2to ensure the newest incremental delivery format is requested.#12927
45ebb52Thanks @jerelmiller! -DeepPartial<Array<TData>>now returnsArray<DeepPartial<TData>>instead ofArray<DeepPartial<TData | undefined>>.#13071
99ffe9aThanks @phryneas! -prerenderStatic: Expose return value ofrenderFunctionto userland, fixabortedproperty.This enables usage of
resumeAndPrerenderwith React 19.2.#13026
05eee67Thanks @jerelmiller! - Reduce the number of observables created bywatchFragmentby reusing existing observables as much as possible. This should improve performance when watching the same item in the cache multiple times after a cache update occurs.#13010
7627000Thanks @jerelmiller! - Handle@streampayloads that send multiple items in the same chunk when using theDefer20220824Handler.#13010
7627000Thanks @jerelmiller! - Handle an edge case with theDefer20220824Handlerwhere an error for a@streamitem that bubbles to the@streamboundary (such as an item returningnullfor a non-null array item) would write items from future chunks to the wrong array index. In these cases, the@streamfield is no longer processed and future updates to the field are ignored. This prevents runtime errors that TypeScript would otherwise not be able to catch.#13081
1e06ad7Thanks @jerelmiller! - Avoid callingmergefunctions more than once for the same incremental chunk.v4.0.13Compare Source
Patch Changes
#13094
9cbe2c2Thanks @phryneas! - Ensure thatcompactandmergeOptionspreserve symbol keys.This fixes an issue where the change introduced in 4.0.11 via #13049 would not
be applied if
defaultOptionsforwatchQuerywere declared.Please note that
compactandmergeOptionsare considered internal utilitiesand they might have similar behavior changes in future releases.
Do not use them in your application code - a change like this is not considered
breaking and will not be announced as such.
v4.0.12Compare Source
Patch Changes
#12884
d329790Thanks @phryneas! - Ensure thatPreloadedQueryRefinstances are unsubscribed when garbage collected#13069
9cad04aThanks @jerelmiller! - Truncate @stream arrays only on last chunk by defaultv4.0.11Compare Source
Patch Changes
#13050
8020829Thanks @phryneas! - Replace usage offindLastwith more backwards-compatible methods.#13049
05638deThanks @phryneas! - Fixes an issue where queries starting withskipTokenor lazy queries fromuseLazyQuerywere included inclient.refetchQueries()before they had been executed for the first time. While generally queries with astandbyfetchPolicyshould be included in refetch, these queries never hadvariablespassed in, so they should be excluded until they have run once and received their actual variables.These queries are now properly excluded from refetch operations until after their initial execution.
This change adds a new hidden option to
client.watchQuery,[variablesUnknownSymbol], which may be settruefor queries starting with afetchPolicyofstandby. It will only be applied when creating theObservableQueryinstance and cannot be changed later. This flag indicates that the query's variables are not yet known, and thus it should be excluded from refetch operations until they are.This option is not meant for everyday use and is intended for framework integrations only.
v4.0.10Compare Source
Patch Changes
af4acdcThanks @phryneas! - Fix memory leak #13036v4.0.9Compare Source
Patch Changes
8f3bc9bThanks @jerelmiller! - Fix an issue where switching from options withvariablestoskipTokenwithuseSuspenseQueryanduseBackgroundQuerywould create a newObservableQuery. This could cause unintended refetches wherevariableswere absent in the request when the query was referenced withrefetchQueries.v4.0.8Compare Source
Patch Changes
f6d0efaThanks @CarsonF! - Fix cache.modify() mapping readonly arrays to singular referencev4.0.7Compare Source
Patch Changes
5b4f36aThanks @jerelmiller! - Don't sendoperationTypein the payload sent byGraphQLWsLink.v4.0.6Compare Source
Patch Changes
3b0d89bThanks @phryneas! - Fix a problem withfetchMorewhere the loading state wouldn't reset if the result wouldn't result in a data update.v4.0.5Compare Source
Patch Changes
e2fc385Thanks @phryneas! - Fix an invariance type error in theMockedResponsetype.v4.0.4Compare Source
Patch Changes
#12892
db8a04bThanks @jerelmiller! - Prevent unhandled rejections from the promise returned by calling themutatefunction from theuseMutationhook.#12899
5352c12Thanks @phryneas! - Fix an issue wheninvariantis called by external libraries when no dev error message handler is loaded.#12895
71f2517Thanks @jerelmiller! - SupportskipTokenwithuseQueryto provide a more type-safe way to skip query execution.Note: this change is provided as a patch within the 4.0 minor version because the changes to TypeScript validation with required variables in version 4.0 made using the
skipoption more difficult.#12900
c0d5be7Thanks @phryneas! - Use named exportequalinstead of default from"@​wry/equality"v4.0.3Compare Source
Patch Changes
#12887
6f6ca47Thanks @phryneas! - Fix accidental deep re-export from/reactout of/react/internals#12890
019b422Thanks @jerelmiller! - Ensure thevariablesoption foruseMutationprovides proper IntelliSense suggestions.v4.0.2Compare Source
Patch Changes
56fac52Thanks @phryneas! - restoregetMemoryInternalsaccess in dev buildsv4.0.1Compare Source
Patch Changes
#12884
d329790Thanks @phryneas! - Ensure thatPreloadedQueryRefinstances are unsubscribed when garbage collected#13069
9cad04aThanks @jerelmiller! - Truncate @stream arrays only on last chunk by defaultv4.0.0Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: package-lock.json
6b0063f2b0to98de439af8Renovate Ignore Notification
Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future
4.xreleases. But if you manually upgrade to4.xthen Renovate will re-enableminorandpatchupdates automatically.If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
Pull request closed