Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 22, 2025

Bumps @apollo/client from 3.14.0 to 4.0.0.

Release notes

Sourced from @​apollo/client's releases.

@​apollo/client@​4.0.0

Apollo Client 4.0 Release Notes

Apollo Client 4.0 delivers a more modern, efficient, and type-safe GraphQL client experience through various architectural improvements and API refinements. This release focuses on developer experience, bundle size optimization, and framework flexibility.

Key Improvements

🎯 Framework-Agnostic Core

Apollo Client 4.0 separates React functionality from the core library, making @apollo/client truly framework-agnostic. React exports now live in @apollo/client/react, allowing developers to use Apollo Client with any JavaScript framework without React dependencies.

📦 Smaller Bundle Sizes

  • Opt-in Local State Management: The @client directive functionality is now opt-in via the LocalState class, reducing bundle size when not using local state
  • Modern Build Target: Transpiled to target since 2023, node >= 20, not dead, leveraging modern JavaScript features for better performance
  • Improved Tree-Shaking: Proper exports field in package.json enables better dead code elimination

💥 Unified Error Handling

Apollo Client 4.0 completely reimagines error handling for better clarity and debugging:

  • ApolloError removed in favor of specific error classes
  • Unification of errors to a single error property
  • Network errors now respect errorPolicy settings
  • External errors passed through without wrapping
  • New, more granular error classes with static .is() methods for robust type narrowing

🔧 Enhanced TypeScript Support

  • Namespaced Types: Types are now colocated with their APIs (e.g., useQuery.Options instead of QueryHookOptions)
  • Precise Return Types: Return types accurately reflect the options passed (e.g., returnPartialData makes data type DeepPartial<TData>)
  • Stricter Type Safety: Required variables are now enforced more consistently throughout the client
  • New dataState Property: Enables accurate type narrowing of query results
  • Module Augmentation: Custom context types via declaration merging instead of fragile generics
  • Customizable Type Implementations: Select types can now be customized to provide your own type implementation to seamlessly integrate with external tools such as GraphQL Codegen or gql.tada

⚡ Modern Observable Implementation

Apollo Client 4.0 migrates from zen-observable to RxJS, providing the industry-standard Observable implementation backed by a rich ecosystem of utilities.

Major Features

Unified Error Handling

Apollo Client 4.0 completely reimagines error handling for better clarity and debugging:

Key Changes:

  • ApolloError removed in favor of specific error classes
  • Network errors now respect errorPolicy settings

... (truncated)

Changelog

Sourced from @​apollo/client's changelog.

4.0.0

Apollo Client 4.0 Release Notes

Apollo Client 4.0 delivers a more modern, efficient, and type-safe GraphQL client experience through various architectural improvements and API refinements. This release focuses on developer experience, bundle size optimization, and framework flexibility.

Key Improvements

🎯 Framework-Agnostic Core

Apollo Client 4.0 separates React functionality from the core library, making @apollo/client truly framework-agnostic. React exports now live in @apollo/client/react, allowing developers to use Apollo Client with any JavaScript framework without React dependencies.

📦 Smaller Bundle Sizes

  • Opt-in Local State Management: The @client directive functionality is now opt-in via the LocalState class, reducing bundle size when not using local state
  • Modern Build Target: Transpiled to target since 2023, node >= 20, not dead, leveraging modern JavaScript features for better performance
  • Improved Tree-Shaking: Proper exports field in package.json enables better dead code elimination

💥 Unified Error Handling

Apollo Client 4.0 completely reimagines error handling for better clarity and debugging:

  • ApolloError removed in favor of specific error classes
  • Unification of errors to a single error property
  • Network errors now respect errorPolicy settings
  • External errors passed through without wrapping
  • New, more granular error classes with static .is() methods for robust type narrowing

🔧 Enhanced TypeScript Support

  • Namespaced Types: Types are now colocated with their APIs (e.g., useQuery.Options instead of QueryHookOptions)
  • Precise Return Types: Return types accurately reflect the options passed (e.g., returnPartialData makes data type DeepPartial<TData>)
  • Stricter Type Safety: Required variables are now enforced more consistently throughout the client
  • New dataState Property: Enables accurate type narrowing of query results
  • Module Augmentation: Custom context types via declaration merging instead of fragile generics
  • Customizable Type Implementations: Select types can now be customized to provide your own type implementation to seamlessly integrate with external tools such as GraphQL Codegen or gql.tada

⚡ Modern Observable Implementation

Apollo Client 4.0 migrates from zen-observable to RxJS, providing the industry-standard Observable implementation backed by a rich ecosystem of utilities.

Major Features

Unified Error Handling

Apollo Client 4.0 completely reimagines error handling for better clarity and debugging:

Key Changes:

  • ApolloError removed in favor of specific error classes

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 22, 2025
@dependabot dependabot bot requested review from arkid15r and kasya as code owners August 22, 2025 07:47
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/frontend/main/apollo/client-4.0.0 branch from 3f92998 to b4db26e Compare August 22, 2025 17:03
Bumps [@apollo/client](https://github.com/apollographql/apollo-client) from 3.14.0 to 4.0.0.
- [Release notes](https://github.com/apollographql/apollo-client/releases)
- [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-client/compare/v3.14.0...@apollo/client@4.0.0)

---
updated-dependencies:
- dependency-name: "@apollo/client"
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/frontend/main/apollo/client-4.0.0 branch from b4db26e to 1d9b45a Compare August 22, 2025 18:44
@sonarqubecloud
Copy link

@arkid15r
Copy link
Collaborator

Will be handled in #2120

@arkid15r arkid15r closed this Aug 22, 2025
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 22, 2025

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/frontend/main/apollo/client-4.0.0 branch August 22, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file frontend javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants