Skip to content

Conversation

@jerelmiller
Copy link
Member

@jerelmiller jerelmiller commented Sep 17, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: 9041611

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@apollo-librarian
Copy link

apollo-librarian bot commented Sep 17, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 5 changed, 0 removed
* (developer-tools)/react/(latest)/caching/advanced-topics.mdx
* (developer-tools)/react/(latest)/caching/cache-field-behavior.mdx
* (developer-tools)/react/(latest)/data/fragments.mdx
* (developer-tools)/react/(latest)/data/mutations.mdx
* (developer-tools)/react/(latest)/performance/server-side-rendering.mdx

Build ID: 07a97efaaff6299ccdcb44c1
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/07a97efaaff6299ccdcb44c1

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 17, 2025

npm i https://pkg.pr.new/apollographql/apollo-client/@apollo/client@12927

commit: 9041611

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 43.54 KB (+1.62% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 38.55 KB (+1.99% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.9 KB (+0.77% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 27.04 KB (+0.86% 🔺)
import { ApolloProvider } from "@apollo/client/react" 5.97 KB (+1.03% 🔺)
import { ApolloProvider } from "@apollo/client/react" (production) 994 B (0%)
import { useQuery } from "@apollo/client/react" 7.4 KB (+0.71% 🔺)
import { useQuery } from "@apollo/client/react" (production) 2.38 KB (0%)
import { useLazyQuery } from "@apollo/client/react" 7.16 KB (+0.69% 🔺)
import { useLazyQuery } from "@apollo/client/react" (production) 2.16 KB (0%)
import { useMutation } from "@apollo/client/react" 6.53 KB (+0.91% 🔺)
import { useMutation } from "@apollo/client/react" (production) 1.52 KB (0%)
import { useSubscription } from "@apollo/client/react" 6.85 KB (+0.87% 🔺)
import { useSubscription } from "@apollo/client/react" (production) 1.82 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 8.64 KB (+1.03% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.67 KB (+1.08% 🔺)
import { useBackgroundQuery } from "@apollo/client/react" 8.41 KB (+0.81% 🔺)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.43 KB (+0.98% 🔺)
import { useLoadableQuery } from "@apollo/client/react" 8.38 KB (+1.05% 🔺)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.42 KB (+0.87% 🔺)
import { useReadQuery } from "@apollo/client/react" 6.65 KB (+0.77% 🔺)
import { useReadQuery } from "@apollo/client/react" (production) 1.65 KB (-0.36% 🔽)
import { useFragment } from "@apollo/client/react" 6.71 KB (+0.74% 🔺)
import { useFragment } from "@apollo/client/react" (production) 1.71 KB (0%)

phryneas and others added 18 commits September 24, 2025 18:48
* Create mechanism to add experimental features to Apollo Client

* add comment, v1

* Clean up Prettier, Size-limit, and Api-Extractor

---------

Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…t.watchFragment` (#12971)

Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
Co-authored-by: jerelmiller <565661+jerelmiller@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
#13009)

* Allow `FragmentType` not only to be called as `FragmentType<TData>`, but also as `FragmentType<TypedDocumentNode>`.

* update non-type-import

* simplify type

* chores

* fixup 🤦

* lint

* Clean up Prettier, Size-limit, and Api-Extractor

---------

Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
* Add helper type `QueryRef.ForQuery<TypedDocumentNode>`

* chores
* update react compiler to 1.0.0

* update test

* cleanup
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
github-actions bot and others added 2 commits November 17, 2025 11:30
* Version Packages (alpha)

* Fix wrong pr/author refs

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
github-actions bot and others added 30 commits December 5, 2025 14:00
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to release-4.1, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`release-4.1` is currently in **pre mode** so this branch has
prereleases rather than normal releases. If you want to exit
prereleases, run `changeset pre exit` on `release-4.1`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/client@4.1.0-alpha.9

### Minor Changes

- [#13056](#13056)
[`b224efc`](b224efc)
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.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ingleFragment` (#13053)

This will memoize without a risk of memoization collisions if there are
multiple code paths calling `watchSingleFragment` with the same
fragment, but different `transformData`.

Follow-up to #13026

---------

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
# Releases
## @apollo/client@4.1.0-alpha.10

### Patch Changes

- [#13053](#13053)
[`23ca0ba`](23ca0ba)
Thanks [@phryneas](https://github.com/phryneas)! - Use memoized
observable mapping when using `watchFragment`, `useFragment` or
`useSuspenseFragment`.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Rollback changes to unreleased versions from #13060 and #13061 to
trigger a release PR
Add a new `extensions` option to `cache.write`, `cache.writeQuery`, and
`client.writeQuery` that makes them available to cache `merge`
functions. `extensions` returned in GraphQL operations that write to the
cache are now provided to the cache write operation.

This is the precursor to the change needed to handle a more robust
`refetch` with the `@stream` directive as discussed in
#12923 (comment).

---------

Co-authored-by: jerelmiller <565661+jerelmiller@users.noreply.github.com>
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-4.1, this
PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`release-4.1` is currently in **pre mode** so this branch has
prereleases rather than normal releases. If you want to exit
prereleases, run `changeset pre exit` on `release-4.1`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/client@4.1.0-alpha.9

### Minor Changes

- [#13056](#13056)
[`b224efc`](b224efc)
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](#13058)
[`121a2cb`](121a2cb)
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.

### Patch Changes

- [#13053](#13053)
[`23ca0ba`](23ca0ba)
Thanks [@phryneas](https://github.com/phryneas)! - Use memoized
observable mapping when using `watchFragment`, `useFragment` or
`useSuspenseFragment`.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: apollogithubactionsbot[bot] <159198662+apollogithubactionsbot[bot]@users.noreply.github.com>
Updates the default `@stream` behavior to maintain existing cache data
as much as possible. Currently the `@stream` array is truncated when the
first chunk arrives which means you might lose data on screen suddenly
while the data is fetched. We want to maintain the truncation, but only
when the server completes the stream of data.

---------

Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-4.1, this
PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`release-4.1` is currently in **pre mode** so this branch has
prereleases rather than normal releases. If you want to exit
prereleases, run `changeset pre exit` on `release-4.1`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/client@4.0.12-beta.0

### Patch Changes

- [#12884](#12884)
[`d329790`](d329790)
Thanks [@phryneas](https://github.com/phryneas)! - Ensure that
`PreloadedQueryRef` instances are unsubscribed when garbage collected

- [#13069](#13069)
[`9cad04a`](9cad04a)
Thanks [@jerelmiller](https://github.com/jerelmiller)! - Truncate
@stream arrays only on last chunk by default

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Finish rename of some variables from `streamDetails` to `streamInfo`
from #13069 for consistency

---------

Co-authored-by: jerelmiller <565661+jerelmiller@users.noreply.github.com>
…ons (#13078)

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
)

Avoids calling `merge` functions more than once for duplicate
incremental chunks. This could happen if there were multiple `@stream`
fields in the result where only one of the streamed fields emitted a
chunk.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-4.1, this
PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`release-4.1` is currently in **pre mode** so this branch has
prereleases rather than normal releases. If you want to exit
prereleases, run `changeset pre exit` on `release-4.1`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/client@4.1.0-rc.0

### Minor Changes

- [#13078](#13078)
[`bf1e0dc`](bf1e0dc)
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

- [#13083](#13083)
[`f3c2be1`](f3c2be1)
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.

- [#13082](#13082)
[`c257418`](c257418)
Thanks [@phryneas](https://github.com/phryneas)! - Pass `streamInfo`
through result extensions as a `WeakRef`.

- [#13081](#13081)
[`1e06ad7`](1e06ad7)
Thanks [@jerelmiller](https://github.com/jerelmiller)! - Avoid calling
`merge` functions more than once for the same incremental chunk.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…d, fix `aborted` property. (#13071)

`prerenderStatic`: Expose return value of `renderFunction` to userland,
fix `aborted` property.

This enables usage of `resumeAndPrerender` with React 19.2.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Co-authored-by: jerelmiller <565661+jerelmiller@users.noreply.github.com>
Fixes #13085

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-4.1, this
PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`release-4.1` is currently in **pre mode** so this branch has
prereleases rather than normal releases. If you want to exit
prereleases, run `changeset pre exit` on `release-4.1`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/client@4.1.0-rc.1

### Patch Changes

- [#13086](#13086)
[`1a1d408`](1a1d408)
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.

- [#13071](#13071)
[`99ffe9a`](99ffe9a)
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.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants