Skip to content

Releases: apollographql/apollo-client

v3.7.2

06 Dec 17:22
Compare
Choose a tag to compare

Improvements (from CHANGELOG.md)

  • Only show dev tools suggestion in the console when connectToDevTools is true.
    @chris110408 in #10258

  • Pass TCache generic to MutationHookOptions for better type support in useMutation.
    @igrlk in #10223

  • Add name property to ApolloError to ensure better type safety and help error reporting tools better identify the error.
    @aaronadamsCA in #9323

  • Export a ModifierDetails type for the details parameter of a Modifier function.
    @KeithGillette in #7133

  • Revert use of cloneDeep to clone options when fetching queries.
    @MrDoomBringer in #10215

What's Changed (auto-generated by GitHub)

New Contributors

Full Changelog: v3.7.1...v3.7.2

3.7.1

20 Oct 20:18
e6ad3c9
Compare
Choose a tag to compare

Bug fixes (from CHANGELOG.md)

  • Fix issue where loading remains true after observer.refetch is called repeatedly with different variables when the same data are returned.
    @alessbell in #10143

  • Fix race condition where useFragment_experimental could receive cache updates before initially calling cache.watch in useEffect.
    @benjamn in #10212

What's Changed (auto-generated by GitHub)

New Contributors (auto-generated by GitHub)

Full Changelog: v3.7.0...v3.7.1

v3.7.0

30 Sep 17:30
9134aaf
Compare
Choose a tag to compare

New Features (from CHANGELOG.md)

  • Implement preview support for the @defer directive.
    @alessbell and @benjamn in #10018

  • Implement useFragment_experimental hook, which represents a lightweight live binding into the ApolloCache, and never triggers network requests of its own.
    @benjamn in #8782

  • Allow registering named fragments with InMemoryCache to support using ...NamedFragment in queries without redeclaring NamedFragment repeatedly in every query that uses it.
    @benjamn in #9764

  • Support onError callback for useSubscription hook.
    @jeroenvisser101 in #9495

Improvements (from CHANGELOG.md)

  • Delay calling onCompleted and onError callbacks passed to useQuery using Promise.resolve().then(() => ...) to fix issue #9794.
    @dylanwulf in #9823

  • Replace concast.cleanup method with simpler concast.beforeNext API, which promises to call the given callback function just before the next result/error is delivered. In addition, concast.removeObserver no longer takes a quietly?: boolean parameter, since that parameter was partly responsible for cleanup callbacks sometimes not getting called.
    @benjamn in #9718

  • Allow preserving header name capitalization when creating an HttpLink with createHttpLink({ uri, preserveHeaderCase: true }). Otherwise, header names are converted to lowercase to prevent case-sensitivity bugs.
    @MrDoomBringer in #9891

  • Make queries with a pollInterval respect the no-cache fetch policy, instead of writing polled results into the cache.
    @MrDoomBringer in #10020

  • Deprecate the onSubscriptionData callback in favor of a new onData callback for the useSubscription hook. Deprecate the onSubscriptionComplete callback in favor of a new onComplete callback for the useSubscription hook.
    @jerelmiller in #10134

Potentially disruptive (from CHANGELOG.md)

  • The optional subscribeAndCount testing utility exported from @apollo/client/testing/core now takes a single generic TResult type parameter, instead of TData. This type will typically be inferred from the observable argument type, but if you have any explicit calls to subscribeAndCount<TData>(...) in your own codebase, you may need to adjust those calls accordingly.
    @benjamn in #9718

What's Changed (auto-generated by GitHub)

New Contributors 🎉 🙌 🥳

Full Changelog: v3.6.10...v3.7.0

v3.6.10

29 Sep 23:49
5b29ea6
Compare
Choose a tag to compare

Improvements (from CHANGELOG.md)

  • The client options (variables, context, etc.) used for mutation calls are now available as the second argument to the onCompleted and onError callback functions.
    @MrDoomBringer in #10052

What's Changed

New Contributors

Full Changelog: v3.6.9...v.3.6.10

v3.6.9

29 Sep 23:49
f75de97
Compare
Choose a tag to compare

Bug Fixes (from CHANGELOG.md)

  • Leave fetchPolicy unchanged when skip: true (or in standby) and nextFetchPolicy is available, even if variables change.
    @benjamn in #9823

What's Changed

  • removes deprecation language by @jpvajda in #9825
  • Leave fetchPolicy unchanged when skip: true (or in standby) and nextFetchPolicy is available by @benjamn in #9823

Full Changelog: v3.6.8...v3.6.9

v3.6.8

13 Jun 16:31
6bd651b
Compare
Choose a tag to compare

Bug Fixes (from CHANGELOG.md)

  • Fix incorrect variables passed in FieldFunctionOptions for nested readField calls in read and merge 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 returning called as true.
    @KucharskiPiotr in #9798

  • Allow abandoned reobserve requests to unsubscribe from their underlying Observable.
    @javier-garcia-meteologica in #9791

What's Changed (auto-generated by GitHub)

New Contributors 🎉 🙌 🥳

Full Changelog: v3.6.7...v3.6.8

v3.6.7

10 Jun 17:52
83935e8
Compare
Choose a tag to compare

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 underlying Observable.
    @benjamn in #9793

What's Changed (auto-generated by GitHub)

Full Changelog: v3.6.6...v3.6.7

v3.6.6

10 Jun 17:50
a9226c1
Compare
Choose a tag to compare

What's Changed (auto-generated by GitHub)

  • Allow useLazyQuery(query, { defaultOptions }) to benefit from defaultOptions.variables by @benjamn in #9762

Full Changelog: v3.6.5...v3.6.6

v3.6.5

23 May 22:28
b86c363
Compare
Choose a tag to compare

Bug Fixes (from CHANGELOG.md)

  • Restore pre-v3.6 variables replacement behavior of ObservableQuery#reobserve method, fixing a regression that prevented removal of variables.
    @benjamn in #9741

  • Preserve previousData even when different query or client provided to useQuery, instead of resetting previousData to undefined in those cases, matching behavior prior to v3.6.0.
    @benjamn in #9734

  • Fix bug where onCompleted() and onError() are stale for useMutation().
    @charle692 in #9740

  • Limit scope of DeepMerger object reuse, and avoid using Object.isFrozen, which can introduce differences between development and production if objects that were frozen using Object.freeze in development are left unfrozen in production.
    @benjamn in #9742

  • Properly merge variables from original useLazyQuery(query, { variables }) with variables passed to execution function.
    @benjamn in #9758

What's Changed (auto-generated by GitHub)

  • Preserve previousData even when different client or query passed to useQuery by @benjamn in #9734
  • Restore pre-v3.6 variables replacement behavior of ObservableQuery#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 original useLazyQuery(query, { variables }) with variables passed to execution function by @benjamn in #9758

New Contributors

Full Changelog: v3.6.4...v3.6.5

v3.6.4

16 May 23:08
a46240f
Compare
Choose a tag to compare

Bug Fixes (from CHANGELOG.md)

  • Guarantee Concast cleanup without Observable 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 than use-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 dependencies ts-invariant and zen-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 about metro.config.js.
    @benjamn in #9716

  • Handle falsy incoming data more gracefully in offetLimitPagination().merge function.
    @shobhitsharma in #9705

What's Changed (auto-generated by GitHub)

New Contributors

Full Changelog: v3.6.3...v3.6.4