Skip to content

Version Packages (alpha)#12977

Merged
jerelmiller merged 1 commit intorelease-4.1from
changeset-release/release-4.1
Oct 27, 2025
Merged

Version Packages (alpha)#12977
jerelmiller merged 1 commit intorelease-4.1from
changeset-release/release-4.1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Oct 21, 2025

This PR was opened by the Changesets release 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. 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/[email protected]

Minor Changes

  • #12971 d11eb40 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,
    }
  • #12971 d11eb40 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.

    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 }
    }
  • #12971 d11eb40 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.

    const observable = client.watchFragment({
      fragment,
      from: { __typename: "Item", id: 1 },
    });
    
    console.log(observable.getCurrentResult());
    // {
    //   data: {...},
    //   dataState: "complete",
    //   complete: true,
    // }

Patch Changes

  • #12971 d11eb40 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.

  • #12982 5c56b32 Thanks @jerelmiller! - Ignore top-level data values on subsequent chunks in incremental responses.

  • #12982 5c56b32 Thanks @jerelmiller! - Fix the Defer20220824Handler.SubsequentResult type to match the FormattedSubsequentIncrementalExecutionResult type in [email protected].

  • #12973 072da24 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.

  • #12971 d11eb40 Thanks @jerelmiller! - DeepPartial<Array<TData>> now returns Array<DeepPartial<TData>> instead of Array<DeepPartial<TData | undefined>>.

@apollo-librarian
Copy link
Copy Markdown

apollo-librarian bot commented Oct 21, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 11 changed, 0 removed
* (developer-tools)/react/(latest)/caching/cache-configuration.mdx
* (developer-tools)/react/(latest)/data/fragments.mdx
* (developer-tools)/react/(latest)/data/mutations.mdx
* (developer-tools)/react/(latest)/data/persisted-queries.mdx
* (developer-tools)/react/(latest)/data/queries.mdx
* (developer-tools)/react/(latest)/development-testing/testing.mdx
* (developer-tools)/react/(latest)/integrations/react-native.mdx
* (developer-tools)/react/(latest)/migrating/apollo-client-4-migration.mdx
* (developer-tools)/react/(latest)/performance/server-side-rendering.mdx
* (developer-tools)/react/(latest)/VERSIONING_POLICY.md
* (developer-tools)/react/(latest)/versioning-policy.md

Build ID: ff99ceb8a10e47796537bf67
Build Logs: View logs

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

@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.1 branch from 1c41586 to 06cef3b Compare October 27, 2025 15:16
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Oct 27, 2025

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

commit: 351b92c

@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.1 branch from 06cef3b to 351b92c Compare October 27, 2025 15:36
@jerelmiller jerelmiller merged commit 00e9054 into release-4.1 Oct 27, 2025
43 of 45 checks passed
@github-actions github-actions bot added the auto-cleanup 🤖 label Oct 27, 2025
@jerelmiller jerelmiller deleted the changeset-release/release-4.1 branch October 27, 2025 15:54
jerelmiller pushed a commit that referenced this pull request Nov 17, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant