yarn @apollo/client 3.7.0
v3.7.0

latest releases: 3.12.0-alpha.0, 3.11.8, 3.11.7...
2 years ago

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

Don't miss a new client release

NewReleases is sending notifications on new releases.