Releases: apollographql/apollo-client
v3.6.10
Improvements (from CHANGELOG.md
)
- The client options (
variables
,context
, etc.) used formutation
calls are now available as the second argument to theonCompleted
andonError
callback functions.
@MrDoomBringer in #10052
What's Changed
- adds a prettier ignore file by @jpvajda in #9809
- Fix documentation code snippets for SubscriptionClient by @jpikora in #9820
- Add a new maintainer (Yours Truly) to README by @MrDoomBringer in #9863
- Remove Ignoring errors sections in link and error handling docs. by @alessbell in #9854
- Update the getting started guide to use the FlyBy API by @rkoron007 in #9851
- Mockprovider docs updates by @jpvajda in #9867
- Updates testing docs to use Testing Library by @alessbell in #9888
- Clarify that id is optional on queries in cache.modify documentation by @MrDoomBringer in #9894
- Add defensive isMounted checks before setting state via useMutation Hook by @alessbell in #9883
- Add onQueryUpdate missing parameters by @capucho in #9898
- Type policy inheritance by @jpvajda in #9905
- Use reactive var hook by @jpvajda in #9906
- Remove jest-fetch-mock in favor of fetch-mock, update tests by @alessbell in #9928
- Minor edits to new useReactiveVar reference by @StephenBarlow in #9932
- Add the new CodeSandbox link by @rkoron007 in #9945
- Pin TypeDoc version in Netlify command by @trevorblades in #9950
- Fix TypeDoc generated file paths by @trevorblades in #9951
- Quick doc change to clarify subscriptions don't work in client schema by @MrDoomBringer in #9944
- Run React 17 + 18 tests on CI by @alessbell in #9942
- Roadmap update by @jpvajda in #9966
- chore: update renovate config and add .npmrc by @alessbell in #9967
- chore: update CONTRIBUTING.md by @alessbell in #9953
- Field policy merge docs by @jpvajda in #9969
- add link to solid.js github repo by @jpvajda in #9981
- Replace crypto-hash with a custom hashing function in tests by @hwillson in #9986
- adds broadcast false details by @jpvajda in #9978
- Use function declaration for
WithApolloClient
example by @charpeni in #9977 - docs: Update code block meta strings to make syntax highlighting work again by @trevorblades in #9985
- Fix updateQuery docs having incorrect function signature by @MrDoomBringer in #10002
- Correct error handling example in docs by @MrDoomBringer in #9996
- updates roadmap by @jpvajda in #10013
- adds solid.js to integrations.md by @jpvajda in #10014
- docs: fix React default import by @henryqdineen in #10036
- docs: remove errant duplicated text by @henryqdineen in #10046
- updates local resolver warning by @jpvajda in #10062
- GitHub Workflows security hardening by @sashashura in #10049
- Pass mutation options to handlers by @MrDoomBringer in #10052
- MissingFieldError once again extends Error by @MrDoomBringer in #10051
- Fix typos by @CompuWiser in #10045
- Documentation update for ApolloQueryResult by @MrDoomBringer in #10055
- docs: Update "Using Apollo with TypeScript" with a description of fetchMore and subscribeToMore by @bignimbus in #10066
- fix: make
react-dom
an optional peer dependency by @brillout in #9933 - adds defer docs by @jpvajda in #10079
- updates defer message by @jpvajda in #10088
- Make it clear that @defer is available by installing beta by @hwillson in #10096
- Better error message when failing to match mock variables by @zinkkrysty in #9921
- Export
Modifier
andModifiers
by @olyop in #8973 - chore(docs): add useFragment_experimental documentation by @alessbell in #10099
- Bump up timeout time for batchLink, query and polling tests by @MrDoomBringer in #10097
- remove obsolete displayName query option by @henryqdineen in #10044
- docs: fixup onResetStore docs, convert to hooks by @henryqdineen in #10047
- changes beta to next by @jpvajda in #10119
- local-state-management AC2 LocalState side note by @MrDoomBringer in #10112
- Fix for ServerError obscured by ServerParseError by @dillontiner in #9997
- Remove conditional require()s from SSR by @MrDoomBringer in #9975
- chore(docs): use optional chaining rather than non-null assertion by @charpeni in #10129
- chore(tests): use node v16.10.0 for jest tests due to memory leaks in 16.11+ by @alessbell in #10140
- docs: Fix typo by @Javokhir12 in #10128
New Contributors
- @jpikora made their first contribution in #9820
- @capucho made their first contribution in #9898
- @charpeni made their first contribution in #9977
- @sashashura made their first contribution in #10049
- @CompuWiser made their first contribution in #10045
- @bignimbus made their first contribution in #10066
- @brillout made their first contribution in #9933
- @zinkkrysty made their first contribution in #9921
- @olyop made their first contribution in #8973
- @dillontiner made their first contribution in #9997
- @Javokhir12 made their first contribution in #10128
Full Changelog: v3.6.9...v.3.6.10
v3.6.9
Bug Fixes (from CHANGELOG.md
)
- Leave
fetchPolicy
unchanged whenskip: true
(or in standby) andnextFetchPolicy
is available, even ifvariables
change.
@benjamn in #9823
What's Changed
- removes deprecation language by @jpvajda in #9825
- Leave
fetchPolicy
unchanged whenskip: true
(or in standby) andnextFetchPolicy
is available by @benjamn in #9823
Full Changelog: v3.6.8...v3.6.9
v3.6.8
Bug Fixes (from CHANGELOG.md
)
-
Fix incorrect
variables
passed inFieldFunctionOptions
for nestedreadField
calls inread
andmerge
functions.
@stardustxx in #9808 -
Improve repository build scripts to work better on Windows.
@dylanwulf in #9805 -
Ensure
useQuery(query, { skip: true }).called === false
rather than always returningcalled
astrue
.
@KucharskiPiotr in #9798 -
Allow abandoned
reobserve
requests to unsubscribe from their underlyingObservable
.
@javier-garcia-meteologica in #9791
What's Changed (auto-generated by GitHub)
- fix: fixes FieldFunctionOptions return incorrect variables by @stardustxx in #9808
- Fix build config to work on Windows by @dylanwulf in #9805
- Fix: useQuery returns called value based on skip option. by @KucharskiPiotr in #9798
- fix: abort stale connection on reobserve (#9532) by @javier-garcia-meteologica in #9791
New Contributors 🎉 🙌 🥳
- @stardustxx made their first PR in #9808
- @dylanwulf made their first PR in #9805
- @KucharskiPiotr made their first PR in #9798
Full Changelog: v3.6.7...v3.6.8
v3.6.7
Bug Fixes (from CHANGELOG.md
)
- Fix regression (introduced in v3.6.0) that caused
BatchHttpLink
to discard pending batched queries on early completion of the underlyingObservable
.
@benjamn in #9793
What's Changed (auto-generated by GitHub)
- fixes pr 9600 by @jpvajda in #9776
- Update mutations.mdx by @Gregoirevda in #9708
- updates roadmap for june 2022 by @jpvajda in #9784
- fixes expansion panel by @jpvajda in #9777
- Backport PR #9793 from
release-3.7
branch tomain
by @benjamn in #9807
Full Changelog: v3.6.6...v3.6.7
v3.6.6
v3.6.5
Bug Fixes (from CHANGELOG.md
)
-
Restore pre-v3.6
variables
replacement behavior ofObservableQuery#reobserve
method, fixing a regression that prevented removal of variables.
@benjamn in #9741 -
Preserve
previousData
even when different query or client provided touseQuery
, instead of resettingpreviousData
to undefined in those cases, matching behavior prior to v3.6.0.
@benjamn in #9734 -
Fix bug where
onCompleted()
andonError()
are stale foruseMutation()
.
@charle692 in #9740 -
Limit scope of
DeepMerger
object reuse, and avoid usingObject.isFrozen
, which can introduce differences between development and production if objects that were frozen usingObject.freeze
in development are left unfrozen in production.
@benjamn in #9742 -
Properly merge
variables
from originaluseLazyQuery(query, { variables })
withvariables
passed to execution function.
@benjamn in #9758
What's Changed (auto-generated by GitHub)
- Preserve
previousData
even when different client or query passed touseQuery
by @benjamn in #9734 - Restore pre-v3.6
variables
replacement behavior ofObservableQuery#reobserve
method by @benjamn in #9741 - Clarify modifying response data in link docs by @hatched-kade in #9430
- adds documentation on file uploads by @jpvajda in #9744
- Fix improper syntax with spread operator by @mongodben in #9441
- Reduce confusion about the query component by @jpvajda in #9747
- Fix bug where onCompleted and onError are stale for useMutation. onCompleted and onError could not be changed while a mutation is executing. by @charle692 in #9740
- Restrict
DeepMerger
mutable object reuse to fix subtle production-only bug by @benjamn in #9742 - Merge
variables
from originaluseLazyQuery(query, { variables })
withvariables
passed to execution function by @benjamn in #9758
New Contributors
- @hatched-kade made their first contribution in #9430
- @mongodben made their first contribution in #9441
- @charle692 made their first contribution in #9740
Full Changelog: v3.6.4...v3.6.5
v3.6.4
Bug Fixes (from CHANGELOG.md
)
-
Guarantee
Concast
cleanup withoutObservable cancelled prematurely
rejection, potentially solving long-standing issues involving that error.
@benjamn in #9701 -
Ensure
useSubscription
subscriptions are properly restarted after unmounting/remounting by React 18 in<StrictMode>
.
@kazekyo in #9707
Improvements (from CHANGELOG.md
)
-
Internalize
useSyncExternalStore
shim, for more control thanuse-sync-external-store
provides, fixing some React Native issues.
@benjamn in #9675 and #9709 -
Provide
@apollo/client/**/*.cjs.native.js
versions of every@apollo/client/**/*.cjs
bundle (including dependenciests-invariant
andzen-observable-ts
) to help React Native's Metro bundler automatically resolve CommonJS entry point modules. These changes should render unnecessary the advice we gave in the v3.5.4 section below aboutmetro.config.js
.
@benjamn in #9716 -
Handle falsy
incoming
data more gracefully inoffetLimitPagination().merge
function.
@shobhitsharma in #9705
What's Changed (auto-generated by GitHub)
- Poll interval docs update by @jpvajda in #9687
- [docs] Fix markdown bug in rest link by @ryanrhee in #9698
- Internalize
useSyncExternalStore
shim, for more control thanuse-sync-external-store
provides by @benjamn in #9675 - Guarantee
Concast
cleanup withoutObservable cancelled prematurely
rejection by @benjamn in #9701 - docs: fix code snippet by @santiph in #9703
- Update example headers with authentication by @theill in #9621
- Fix a misplaced semicolon by @mlocher in #9498
- Correct GraphQL variable name "text" to "type" by @FumioNonaka-ksj in #9529
- Add apollo-multi-endpoint-link to community links by @jean9696 in #9301
readQuery
clarification by @avinoamsn in #9195- Update authentication.mdx by @volokolamskspb in #8630
- Add apollo-link-observable to community links by @dragozin in #8234
- apollo-codegen is deprecated, but the tooling documentation still suggests it by @krainboltgreene in #7517
- chore: corrected body params by @jpvajda in #9711
useSyncExternalStore
refinements by @benjamn in #9709- Help React Native import
@apollo/client/main.cjs
and other CommonJS bundles by @benjamn in #9716 - Revamping the "Why Apollo Client" article by @rkoron007 in #9719
- Fix useSubscription bug in React v18 StrictMode (#9664) by @kazekyo in #9707
New Contributors
- @ryanrhee made their first contribution in #9698
- @santiph made their first contribution in #9703
- @theill made their first contribution in #9621
- @mlocher made their first contribution in #9498
- @FumioNonaka-ksj made their first contribution in #9529
- @jean9696 made their first contribution in #9301
- @avinoamsn made their first contribution in #9195
- @volokolamskspb made their first contribution in #8630
- @dragozin made their first contribution in #8234
- @krainboltgreene made their first contribution in #7517
- @kazekyo made their first contribution in #9707
Full Changelog: v3.6.3...v3.6.4
v3.6.3
Bug Fixes (from CHANGELOG.md
)
-
Simplify
useQuery(query, { defaultOptions })
default options processing in order to fix bug whereskip: true
queries failed to execute upon switching toskip: false
.
@benjamn in #9665 -
Add tests of skipping/unskipping and
useLazyQuery
withdefaultOptions
, and fix a bug causing duplicate requests.
@benjamn in #9666 -
Update
ts-invariant
to version 0.10.2 to fix source map warnings.
@benjamn in #9672 -
Test that
useQuery
queries withskip: true
do not stall server-side rendering.
@nathanmarks and @benjamn in #9677 -
Prevent
useLazyQuery
from making duplicate requests when its execution function is first called, and stop rejecting thePromise
it returns whenresult.error
is defined.
@benjamn in #9684 -
Fix issue with
useQuery
returningloading: true
state during server-side rendering withskip: true
.
@nathanmarks in #9679
What's Changed (auto-generated by GitHub)
- Drastically simplify
useQuery
default options processing by @benjamn in #9665 - Docs: fix typo in subscriptions.mdx by @pobch in #9663
- Update
ts-invariant
to version 0.10.2 to fix source map warnings by @benjamn in #9672 - Update queries.mdx by @anilpai in #5466
- Fix failing regression test for skipped SSR
useQuery
stuck in standby by @benjamn in #9677 - Add a comment about a new use of the content-type header by @glasser in #9683
- Add missing assumeImmutableResults documentation by @henryqdineen in #9680
- Prevent
useLazyQuery
from making duplicate requests when execution function first called by @benjamn in #9684 - Fix issue with
useQuery
returningloading: true
state during server-side rendering withskip: true
by @nathanmarks in #9679 - Add description & example of how to handle multiple parameters in read() when declaring typePolicies. by @Moristotle in #6755
- Add link to ts-transform-graphql-tag in the performance docs by @hcharley in #5608
New Contributors
- @anilpai made their first contribution in #5466
- @nathanmarks made their first contribution in #9679
- @Moristotle made their first contribution in #6755
- @hcharley made their first contribution in #5608
Full Changelog: v3.6.2...v3.6.3
3.6.2
What's Changed
- fix Missing getServerSnapshot on React 18 and Next 12 by @hungphongbk in #9652
- Fix persistedQueries to pull graphqlErrors from networkErrors by @redaid113 in #9410
- Update Apollo PersistedQueries in the Apollo BatchHTTP Link by @iamchathu in #9637
- Fix code snippets for SubscriptionClient by @rkoron007 in #9634
- Correct the wrong link in ROADMAP.md by @yukukotani in #9650
- Update Copyright year in LICENSE by @garritfra in #9630
New Contributors
- @iamchathu made their first contribution in #9637
- @hungphongbk made their first contribution in #9652
- @yukukotani made their first contribution in #9650
- @redaid113 made their first contribution in #9410
Full Changelog: v3.6.1...v3.6.2
v3.6.1
What's Changed
- Remove
WatchQueryOptions["fetchBlockingPromise"]
option due to regressions by @benjamn in #9636 - chore(deps): update dependency graphql-ws to v5.8.1 by @renovate in #9592
- Update Full-stack tutorial links to point to Odyssey by @rkoron007 in #9610
- changes the way the parser filters the array of definitions by @rasulomaroff in #9622
- chore: updates roadmap by @jpvajda in #9628
New Contributors
- @rasulomaroff made their first contribution in #9622
- @jpvajda made their first contribution in #9628
Full Changelog: v3.6.0...v3.6.1