-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Version Packages (alpha) #12570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Version Packages (alpha) #12570
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
commit: |
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
78c8c74 to
21c354c
Compare
Contributor
Author
size-limit report 📦
|
863dcc6 to
eb8dd0a
Compare
eb8dd0a to
4596835
Compare
jerelmiller
approved these changes
Apr 17, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.0, this PR will be updated.
release-4.0is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonrelease-4.0.Releases
@apollo/client@4.0.0-alpha.10
Major Changes
#12559
49ace0eThanks @jerelmiller! -ObservableQuery.variablescan now be reset back to empty when callingreobservewithvariables: undefined. Previously thevariableskey would be ignored sovariableswould remain unchanged.#12559
49ace0eThanks @jerelmiller! -neveris no longer supported as a validTVariablesgeneric argument for APIs that requirevariablesas part of its type. UseRecord<string, never>instead.#12559
49ace0eThanks @jerelmiller! - When passing avariableskey with the valueundefined, the value will be replaced by the default value in the query, if it is provided, rather than leave it asundefined.#12562
90bf0e6Thanks @jerelmiller! -client.queryno longer supports afetchPolicyofstandby.standbydoes not fetch and did not returndata.standbyis meant for watched queries where fetching should be on hold.Minor Changes
#12557
51d26aeThanks @jerelmiller! - Add ability to specify message formatter forCombinedGraphQLErrorsandCombinedProtocolErrors. To provide your own message formatter, override the staticformatMessageproperty on these classes.#12546
5dffbbeThanks @jerelmiller! - Add a staticismethod to error types defined by Apollo Client.ismakes it simpler to determine whether an error is a specific type, which can be helpful in cases where you'd like to narrow the error type in order to use specific properties from that error.This change applies to the following error types:
CombinedGraphQLErrorsCombinedProtocolErrorsServerErrorServerParseErrorUnconventionalErrorExample
#12561
99d72bfThanks @jerelmiller! - Add the ability to detect if an error was an error was emitted from the link chain. This is useful if your application throws custom errors in other areas of the application and you'd like to differentiate them from errors emitted by the link chain itself.To detect if an error was emitted from the link chain, use
LinkError.is.Patch Changes
#12559
49ace0eThanks @jerelmiller! - Thevariablesoption used with various APIs are now enforced more consistently across the client whenTVariablescontains required variables. If requiredvariablesare not provided, TypeScript will now complain that it requires avariablesoption.This change affects the following APIs:
client.queryclient.mutateclient.subscribeclient.watchQueryuseBackgroundQueryuseQueryuseSubscriptionuseSuspenseQuery#12559
49ace0eThanks @jerelmiller! - Fix type ofvariablesreturned fromuseLazyQuery. Whencalledisfalse,variablesis nowPartial<TVariables>instead ofTVariables.#12562
90bf0e6Thanks @jerelmiller! -client.queryno longer supportsnotifyOnNetworkStatusChangein options. An error will be thrown if this option is set. The effects of this option were not observable byclient.querysinceclient.queryemits a single result.#12557
51d26aeThanks @jerelmiller! - Update format of the error message forCombinedGraphQLErrorsandCombinedProtocolErrorsto be more like v3.x.#12559
49ace0eThanks @jerelmiller! -ObservableQuery.variableshas been updated to returnTVariablesrather thanTVariables | undefined. This is more consistent with the runtime value where an empty object ({}) will be returned when thevariablesoption is not provided.