PackageTrack

npm · #4032

@apollo/client

4.2.12apollographql/apollo-client

A fully-featured caching GraphQL client.

Release timeline

723 releases since 2019
2020202120222023202420252026

Releases

  1. 3.3.124 Nov 2020
    Release notes2 sources agree

    Bug Fixes

    • Revert back to default-importing React internally, rather than using a namespace import. <br/> @benjamn in 113475b1
    Open source →
  2. 3.3.024 Nov 2020
    Release notes

    Apollo Client 3.3.0

    Bug Fixes

    • Update @wry/equality to consider undefined properties equivalent to missing properties. @benjamn in #7108

    • Prevent memory leaks involving unused onBroadcast function closure created in ApolloClient constructor. @kamilkisiela in #7161

    • Provide default empty cache object for root IDs like ROOT_QUERY, to avoid differences in behavior before/after ROOT_QUERY data has been written into InMemoryCache. @benjamn in #7100

    • Cancel queryInfo.notifyTimeout in QueryInfo#markResult to prevent unnecessary network requests when using a FetchPolicy of cache-and-network or network-only in a React component with multiple useQuery calls. @benjamn in #7347

    Potentially breaking changes

    • Ensure cache.readQuery and cache.readFragment always return TData | null, instead of throwing MissingFieldError exceptions when missing fields are encountered. @benjamn in #7098

      Since this change converts prior exceptions to null returns, and since null was already a possible return value according to the TData | null return type, we are confident this change will be backwards compatible (as long as null was properly handled before).

    • HttpLink will now automatically strip any unused variables before sending queries to the GraphQL server, since those queries are very likely to fail validation, according to the All Variables Used rule in the GraphQL specification. If you depend on the preservation of unused variables, you can restore the previous behavior by passing includeUnusedVariables: true to the HttpLink constructor (which is typically passed as options.link to the ApolloClient constructor). @benjamn in #7127

    • Ensure MockLink (used by MockedProvider) returns mock configuration errors (e.g. No more mocked responses for the query ...) through the Link's Observable, instead of throwing them. These errors are now available through the error property of a result. @hwillson in #7110

      Returning mock configuration errors through the Link's Observable was the default behavior in Apollo Client 2.x. We changed it for 3, but the change has been problematic for those looking to migrate from 2.x to 3. We've decided to change this back with the understanding that not many people want or are relying on MockLink's throwing exception approach. If you want to change this functionality, you can define custom error handling through MockLink.setOnError.

    • Unsubscribing the last observer from an ObservableQuery will once again unsubscribe from the underlying network Observable in all cases, as in Apollo Client 2.x, allowing network requests to be cancelled by unsubscribing. @javier-garcia-meteologica in #7165 and #7170.

    • The independent QueryBaseOptions and ModifiableWatchQueryOptions interface supertypes have been eliminated, and their fields are now defined by QueryOptions. @DCtheTall in #7136

    • Internally, Apollo Client now avoids nested imports from the graphql package, importing everything from the top-level package instead. For example,

      import { visit } from "graphql/language/visitor"
      

      is now just

      import { visit } from "graphql"
      

      Since the graphql package uses .mjs modules, your bundler may need to be configured to recognize .mjs files as ECMAScript modules rather than CommonJS modules. @benjamn in #7185

    Improvements

    • Support inheritance of type and field policies, according to possibleTypes. @benjamn in #7065

    • Allow configuring custom merge functions, including the merge: true and merge: false shorthands, in type policies as well as field policies. @benjamn in #7070

    • The verbosity of Apollo Client console messages can be globally adjusted using the setLogVerbosity function:

      import { setLogVerbosity } from "@apollo/client";
      setLogVerbosity("log"); // display all messages
      setLogVerbosity("warn"); // display only warnings and errors (default)
      setLogVerbosity("error"); // display only errors
      setLogVerbosity("silent"); // hide all console messages
      

      Remember that all logs, warnings, and errors are hidden in production. @benjamn in #7226

    • Modifying InMemoryCache fields that have keyArgs configured will now invalidate only the field value with matching key arguments, rather than invalidating all field values that share the same field name. If keyArgs has not been configured, the cache must err on the side of invalidating by field name, as before. @benjamn in #7351

    • Shallow-merge options.variables when combining existing or default options with newly-provided options, so new variables do not completely overwrite existing variables. @amannn in #6927

    • Avoid displaying Cache data may be lost... warnings for scalar field values that happen to be objects, such as JSON data. @benjamn in #7075

    • In addition to the result.data property, useQuery and useLazyQuery will now provide a result.previousData property, which can be useful when a network request is pending and result.data is undefined, since result.previousData can be rendered instead of rendering an empty/loading state. @hwillson in #7082

    • Passing validate: true to the SchemaLink constructor will enable validation of incoming queries against the local schema before execution, returning validation errors in result.errors, just like a non-local GraphQL endpoint typically would. @amannn in #7094

    • Allow optional arguments in keyArgs: [...] arrays for InMemoryCache field policies. @benjamn in #7109

    • Avoid registering QueryPromise when skip is true during server-side rendering. @izumin5210 in #7310

    • ApolloCache objects (including InMemoryCache) may now be associated with or disassociated from individual reactive variables by calling reactiveVar.attachCache(cache) and/or reactiveVar.forgetCache(cache). @benjamn in #7350

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Update @wry/equality to consider undefined properties equivalent to missing properties. <br/> @benjamn in #7108

    • Prevent memory leaks involving unused onBroadcast function closure created in ApolloClient constructor. <br/> @kamilkisiela in #7161

    • Provide default empty cache object for root IDs like ROOT_QUERY, to avoid differences in behavior before/after ROOT_QUERY data has been written into InMemoryCache. <br/> @benjamn in #7100

    • Cancel queryInfo.notifyTimeout in QueryInfo#markResult to prevent unnecessary network requests when using a FetchPolicy of cache-and-network or network-only in a React component with multiple useQuery calls. <br/> @benjamn in #7347

    Potentially breaking changes

    • Ensure cache.readQuery and cache.readFragment always return TData | null, instead of throwing MissingFieldError exceptions when missing fields are encountered. <br/> @benjamn in #7098

      Since this change converts prior exceptions to null returns, and since null was already a possible return value according to the TData | null return type, we are confident this change will be backwards compatible (as long as null was properly handled before).

    • HttpLink will now automatically strip any unused variables before sending queries to the GraphQL server, since those queries are very likely to fail validation, according to the All Variables Used rule in the GraphQL specification. If you depend on the preservation of unused variables, you can restore the previous behavior by passing includeUnusedVariables: true to the HttpLink constructor (which is typically passed as options.link to the ApolloClient constructor). <br/> @benjamn in #7127

    • Ensure MockLink (used by MockedProvider) returns mock configuration errors (e.g. No more mocked responses for the query ...) through the Link's Observable, instead of throwing them. These errors are now available through the error property of a result. <br/> @hwillson in #7110

      Returning mock configuration errors through the Link's Observable was the default behavior in Apollo Client 2.x. We changed it for 3, but the change has been problematic for those looking to migrate from 2.x to 3. We've decided to change this back with the understanding that not many people want or are relying on MockLink's throwing exception approach. If you want to change this functionality, you can define custom error handling through MockLink.setOnError.

    • Unsubscribing the last observer from an ObservableQuery will once again unsubscribe from the underlying network Observable in all cases, as in Apollo Client 2.x, allowing network requests to be cancelled by unsubscribing. <br/> @javier-garcia-meteologica in #7165 and #7170.

    • The independent QueryBaseOptions and ModifiableWatchQueryOptions interface supertypes have been eliminated, and their fields are now defined by QueryOptions. <br/> @DCtheTall in #7136

    • Internally, Apollo Client now avoids nested imports from the graphql package, importing everything from the top-level package instead. For example,

      import { visit } from "graphql/language/visitor";
      

      is now just

      import { visit } from "graphql";
      

      Since the graphql package uses .mjs modules, your bundler may need to be configured to recognize .mjs files as ECMAScript modules rather than CommonJS modules. <br/> @benjamn in #7185

    Improvements

    • Support inheritance of type and field policies, according to possibleTypes. <br/> @benjamn in #7065

    • Allow configuring custom merge functions, including the merge: true and merge: false shorthands, in type policies as well as field policies. <br/> @benjamn in #7070

    • The verbosity of Apollo Client console messages can be globally adjusted using the setLogVerbosity function:

      import { setLogVerbosity } from "@apollo/client";
      setLogVerbosity("log"); // display all messages
      setLogVerbosity("warn"); // display only warnings and errors (default)
      setLogVerbosity("error"); // display only errors
      setLogVerbosity("silent"); // hide all console messages
      

      Remember that all logs, warnings, and errors are hidden in production. <br/> @benjamn in #7226

    • Modifying InMemoryCache fields that have keyArgs configured will now invalidate only the field value with matching key arguments, rather than invalidating all field values that share the same field name. If keyArgs has not been configured, the cache must err on the side of invalidating by field name, as before. <br/> @benjamn in #7351

    • Shallow-merge options.variables when combining existing or default options with newly-provided options, so new variables do not completely overwrite existing variables. <br/> @amannn in #6927

    • Avoid displaying Cache data may be lost... warnings for scalar field values that happen to be objects, such as JSON data. <br/> @benjamn in #7075

    • In addition to the result.data property, useQuery and useLazyQuery will now provide a result.previousData property, which can be useful when a network request is pending and result.data is undefined, since result.previousData can be rendered instead of rendering an empty/loading state. <br/> @hwillson in #7082

    • Passing validate: true to the SchemaLink constructor will enable validation of incoming queries against the local schema before execution, returning validation errors in result.errors, just like a non-local GraphQL endpoint typically would. <br/> @amannn in #7094

    • Allow optional arguments in keyArgs: [...] arrays for InMemoryCache field policies. <br/> @benjamn in #7109

    • Avoid registering QueryPromise when skip is true during server-side rendering. <br/> @izumin5210 in #7310

    • ApolloCache objects (including InMemoryCache) may now be associated with or disassociated from individual reactive variables by calling reactiveVar.attachCache(cache) and/or reactiveVar.forgetCache(cache). <br/> @benjamn in #7350

    Open source →
  3. 3.3.0-rc.524 Nov 2020pre-release

    Nothing published for this version

  4. 3.3.0-rc.422 Nov 2020pre-release

    Nothing published for this version

  5. 3.3.0-rc.320 Nov 2020pre-release

    Nothing published for this version

  6. 3.3.0-rc.218 Nov 2020pre-release

    Nothing published for this version

  7. 3.3.0-rc.117 Nov 2020pre-release

    Nothing published for this version

  8. 3.3.0-rc.04 Nov 2020pre-release

    Nothing published for this version

  9. 3.3.0-beta.172 Nov 2020pre-release

    Nothing published for this version

  10. 3.3.0-beta.1627 Oct 2020pre-release

    Nothing published for this version

  11. 3.3.0-beta.1526 Oct 2020pre-release

    Nothing published for this version

  12. 3.3.0-beta.1419 Oct 2020pre-release

    Nothing published for this version

  13. 3.3.0-beta.1316 Oct 2020pre-release

    Nothing published for this version

  14. 3.3.0-beta.1213 Oct 2020pre-release

    Nothing published for this version

  15. 3.3.0-beta.1110 Oct 2020pre-release

    Nothing published for this version

  16. 3.3.0-beta.102 Oct 2020pre-release

    Nothing published for this version

  17. 3.3.0-beta.91 Oct 2020pre-release

    Nothing published for this version

  18. 3.3.0-beta.81 Oct 2020pre-release

    Nothing published for this version

  19. 3.3.0-beta.730 Sept 2020pre-release

    Nothing published for this version

  20. 3.3.0-beta.628 Sept 2020pre-release

    Nothing published for this version

  21. 3.3.0-beta.525 Sept 2020pre-release

    Nothing published for this version

  22. 3.3.0-beta.425 Sept 2020pre-release

    Nothing published for this version

  23. 3.3.0-beta.324 Sept 2020pre-release

    Nothing published for this version

  24. 3.3.0-beta.223 Sept 2020pre-release

    Nothing published for this version

  25. 3.3.0-beta.117 Sept 2020pre-release

    Nothing published for this version

  26. 3.3.0-beta.014 Sept 2020pre-release

    Nothing published for this version

  27. 3.2.924 Nov 2020
    Release notes2 sources agree

    Bug Fixes

    • Revert back to default-importing React internally, rather than using a namespace import. <br/> @benjamn in 113475b1
    Open source →
  28. 3.2.824 Nov 2020
    Release notes2 sources agree

    Bug Fixes

    • Ensure sourcesContent array is properly defined in .js.map files generated by tsc. <br/> @benjamn in #7371

    • Avoid relying on global Symbol properties in ApolloContext.ts. <br/> @benjamn in #7371

    Open source →
  29. 3.2.717 Nov 2020
    Release notes2 sources agree

    Bug Fixes

    • Revert updating symbol-observable from version 2.x to version 3, which caused TypeScript errors with some @types/node versions, especially in Angular applications. <br/> @benjamn in #7340
    Open source →
  30. 3.2.616 Nov 2020
    Release notes2 sources agree

    Bug Fixes

    • Always consider singleton IDs like ROOT_QUERY and ROOT_MUTATION to be root IDs during cache.gc garbage collection, regardless of whether they have been retained or released. <br/> @benjamn in #7333

    • Use optional chaining syntax (this.currentObservable?.refetch) in React refetch wrapper function to avoid crashing when an unmounted component is accidentally refetched. <br/> @tm1000 in #6314 and @linmic in #7186

    Improvements

    • Handle older react-apollo package in codemods/ac2-to-ac3/imports.js migration script. <br/> @tm1000 in #7216

    • Ensure relayStylePagination preserves pageInfo.{start,end}Cursor if edges is missing or empty. <br/> @beaucollins in #7224

    Open source →
  31. 3.2.519 Oct 2020
    Release notes2 sources agree

    Improvements

    • Move terser dependency from dependencies to devDependencies. <br/> @SimenB in #7188

    • Avoid all sub-package imports from the graphql npm package. <br/> @stoically in #7185

    Open source →
  32. 3.2.413 Oct 2020
    Release notes2 sources agree

    Improvements

    • Update the optimism npm dependency to version 0.13.0 in order to use the new optimistic.forget method to fix a potential cache.watch memory leak. <br/> @benjamn in #7157

    • Consider cache.reset a destructive method, like cache.evict and cache.modify. <br/> @joshjg in #7150

    • Avoid refetching observerless queries with reFetchObservableQueries. <br/> @joshjg in #7146

    Open source →
  33. 3.2.310 Oct 2020
    Release notes2 sources agree

    Improvements

    • Default args.offset to zero in offsetLimitPagination. <br/> @benjamn in #7141
    Open source →
  34. 3.2.21 Oct 2020
    Release notes2 sources agree

    Bug Fixes

    • Undo TEdgeWrapper approach for relayStylePagination, introduced by f41e9efc in #7023, since it was an unintended breaking change for existing code that used cache.modify to interact with field data managed by relayStylePagination. <br/> @benjamn in #7103
    Open source →
  35. 3.2.123 Sept 2020
    Release notes2 sources agree

    Bug Fixes

    • Fix relayStylePagination to handle the possibility that edges might be normalized Reference objects (uncommon). <br/> @anark and @benjamn in #7023

    • Disable "Missing cache result fields" warnings when returnPartialData is true. <br/> @hwillson in #7055

    Improvements

    • Mark subscriptions-transport-ws peerDependency as optional. <br/> @MasterOdin in #7047
    Open source →
  36. 3.2.014 Sept 2020
    Release notes

    Apollo Client 3.2.0

    Bug Fixes

    • Use options.nextFetchPolicy internally to restore original FetchPolicy after polling with fetchPolicy: "network-only", so that polling does not interfere with normal query watching. @benjamn in #6893

    • Initialize ObservableQuery in updateObservableQuery even if skip is true. @mu29 in #6999

    • Prevent full reobservation of queries affected by optimistic mutation updates, while still delivering results from the cache. @benjamn in #6854

    Improvements

    • In TypeScript, all APIs that take DocumentNode parameters now may alternatively take TypeDocumentNode<Data, Variables>. This type has the same JavaScript representation but allows the APIs to infer the data and variable types instead of requiring you to specify types explicitly at the call site. @dotansimha in #6720

    • Bring back an improved form of heuristic fragment matching, by allowing possibleTypes to specify subtype regular expression strings, which count as matches if the written result object has all the fields expected for the fragment. @benjamn in #6901

    • Allow options.nextFetchPolicy to be a function that takes the current FetchPolicy and returns a new (or the same) FetchPolicy, making nextFetchPolicy more suitable for global use in defaultOptions.watchQuery. @benjamn in #6893

    • Implement useReactiveVar hook for consuming reactive variables in React components. @benjamn in #6867

    • Move apollo-link-persisted-queries implementation to @apollo/client/link/persisted-queries. Try running our automated imports transform to handle this conversion, if you're using apollo-link-persisted-queries. @hwillson in #6837

    • Disable feud-stopping logic after any cache.evict or cache.modify operation. @benjamn in #6817 and #6898

    • Throw if writeFragment cannot identify options.data when no options.id provided. @jcreighton in #6859

    • Provide options.storage object to cache.modify functions, as provided to read and merge functions. @benjamn in #6991

    • Allow cache.modify functions to return details.INVALIDATE (similar to details.DELETE) to invalidate the current field, causing affected queries to rerun, even if the field's value is unchanged. @benjamn in #6991

    • Support non-default ErrorPolicy values (that is, "ignore" and "all", in addition to the default value "none") for mutations and subscriptions, like we do for queries. @benjamn in #7003

    • Remove invariant forbidding a FetchPolicy of cache-only in ObservableQuery#refetch. @benjamn in ccb0a79a, fixing #6702

    Apollo Client 3.1.5

    Bug Fixes

    • Make ApolloQueryResult.data field non-optional again. @benjamn in #6997

    Improvements

    • Allow querying Connection metadata without args in relayStylePagination. @anark in #6935

    Apollo Client 3.1.4

    Bug Fixes

    • Restrict root object identification to ROOT_QUERY (the ID corresponding to the root Query object), allowing Mutation and Subscription as user-defined types. @benjamn in #6914

    • Prevent crash when pageInfo and empty edges are received by relayStylePagination. @fracmak in #6918

    Apollo Client 3.1.3

    Bug Fixes

    • Consider only result.data (rather than all properties of result) when settling cache feuds. @danReynolds in #6777

    Improvements

    Apollo Client 3.1.2

    Bug Fixes

    Improvements

    • Allow SchemaLink.Options.context function to be async (or return a Promise). @benjamn in #6735

    Apollo Client 3.1.1

    Bug Fixes

    • Re-export cache types from @apollo/client/core (and thus also @apollo/client), again. @benjamn in #6725
    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Use options.nextFetchPolicy internally to restore original FetchPolicy after polling with fetchPolicy: "network-only", so that polling does not interfere with normal query watching. <br/> @benjamn in #6893

    • Initialize ObservableQuery in updateObservableQuery even if skip is true. <br/> @mu29 in #6999

    • Prevent full reobservation of queries affected by optimistic mutation updates, while still delivering results from the cache. <br/> @benjamn in #6854

    Improvements

    • In TypeScript, all APIs that take DocumentNode parameters now may alternatively take TypeDocumentNode<Data, Variables>. This type has the same JavaScript representation but allows the APIs to infer the data and variable types instead of requiring you to specify types explicitly at the call site. <br/> @dotansimha in #6720

    • Bring back an improved form of heuristic fragment matching, by allowing possibleTypes to specify subtype regular expression strings, which count as matches if the written result object has all the fields expected for the fragment. <br/> @benjamn in #6901

    • Allow options.nextFetchPolicy to be a function that takes the current FetchPolicy and returns a new (or the same) FetchPolicy, making nextFetchPolicy more suitable for global use in defaultOptions.watchQuery. <br/> @benjamn in #6893

    • Implement useReactiveVar hook for consuming reactive variables in React components. <br/> @benjamn in #6867

    • Move apollo-link-persisted-queries implementation to @apollo/client/link/persisted-queries. Try running our automated imports transform to handle this conversion, if you're using apollo-link-persisted-queries. <br/> @hwillson in #6837

    • Disable feud-stopping logic after any cache.evict or cache.modify operation. <br/> @benjamn in #6817 and #6898

    • Throw if writeFragment cannot identify options.data when no options.id provided. <br/> @jcreighton in #6859

    • Provide options.storage object to cache.modify functions, as provided to read and merge functions. <br/> @benjamn in #6991

    • Allow cache.modify functions to return details.INVALIDATE (similar to details.DELETE) to invalidate the current field, causing affected queries to rerun, even if the field's value is unchanged. <br/> @benjamn in #6991

    • Support non-default ErrorPolicy values (that is, "ignore" and "all", in addition to the default value "none") for mutations and subscriptions, like we do for queries. <br/> @benjamn in #7003

    • Remove invariant forbidding a FetchPolicy of cache-only in ObservableQuery#refetch. <br/> @benjamn in ccb0a79a, fixing #6702

    Open source →
  37. 3.2.0-rc.011 Sept 2020pre-release

    Nothing published for this version

  38. 3.2.0-beta.1210 Sept 2020pre-release

    Nothing published for this version

  39. 3.2.0-beta.1110 Sept 2020pre-release

    Nothing published for this version

  40. 3.2.0-beta.108 Sept 2020pre-release

    Nothing published for this version

  41. 3.2.0-beta.928 Aug 2020pre-release

    Nothing published for this version

  42. 3.2.0-beta.828 Aug 2020pre-release

    Nothing published for this version

  43. 3.2.0-beta.727 Aug 2020pre-release

    Nothing published for this version

  44. 3.2.0-beta.625 Aug 2020pre-release

    Nothing published for this version

  45. 3.2.0-beta.525 Aug 2020pre-release

    Nothing published for this version

  46. 3.2.0-beta.420 Aug 2020pre-release

    Nothing published for this version

  47. 3.2.0-beta.318 Aug 2020pre-release

    Nothing published for this version

  48. 3.2.0-beta.210 Aug 2020pre-release

    Nothing published for this version

  49. 3.2.0-beta.16 Aug 2020pre-release

    Nothing published for this version

  50. 3.2.0-beta.04 Aug 2020pre-release

    Nothing published for this version

  51. 3.1.59 Sept 2020
    Release notes2 sources agree

    Bug Fixes

    • Make ApolloQueryResult.data field non-optional again. <br/> @benjamn in #6997

    Improvements

    • Allow querying Connection metadata without args in relayStylePagination. <br/> @anark in #6935
    Open source →
  52. 3.1.427 Aug 2020
    Release notes2 sources agree

    Bug Fixes

    • Restrict root object identification to ROOT_QUERY (the ID corresponding to the root Query object), allowing Mutation and Subscription as user-defined types. <br/> @benjamn in #6914

    • Prevent crash when pageInfo and empty edges are received by relayStylePagination. <br/> @fracmak in #6918

    Open source →
  53. 3.1.36 Aug 2020
    Release notes2 sources agree

    Bug Fixes

    • Consider only result.data (rather than all properties of result) when settling cache feuds. <br/> @danReynolds in #6777

    Improvements

    Open source →
  54. 3.1.23 Aug 2020
    Release notes2 sources agree

    Bug Fixes

    • Avoid making network requests when skip is true. <br/> @hwillson in #6752

    Improvements

    • Allow SchemaLink.Options.context function to be async (or return a Promise). <br/> @benjamn in #6735
    Open source →
  55. 3.1.2-pre.031 Jul 2020pre-release

    Nothing published for this version

  56. 3.1.129 Jul 2020
    Release notes2 sources agree

    Bug Fixes

    • Re-export cache types from @apollo/client/core (and thus also @apollo/client), again. <br/> @benjamn in #6725
    Open source →
  57. 3.1.028 Jul 2020
    Release notes

    Apollo Client 3.1.0

    Bug Fixes

    • Rework interdependencies between @apollo/client/* entry points, so that CommonJS and ESM modules are supported equally well, without any duplication of shared code. @benjamn in #6656 and #6657

    • Tolerate !== callback functions (like onCompleted and onError) in useQuery options, since those functions are almost always freshly evaluated each time useQuery is called. @hwillson and @benjamn in #6588

    • Respect context.queryDeduplication if provided, and otherwise fall back to client.deduplication (as before). @igaloly in #6261 and @Kujawadl in #6526

    • Refactor ObservableQuery#getCurrentResult to reenable immediate delivery of warm cache results. As part of this refactoring, the ApolloCurrentQueryResult type was eliminated in favor of ApolloQueryResult. @benjamn in #6710

    • Avoid clobbering defaultOptions with undefined values. @benjamn in #6715

    Improvements

    • Apollo Client will no longer modify options.fetchPolicy unless you pass options.nextFetchPolicy to request an explicit change in FetchPolicy after the current request. Although this is technically a breaking change, options.nextFieldPolicy makes it easy to restore the old behavior (by passing cache-first). @benjamn in #6712, reverting #6353

    • Errors of the form Invariant Violation: 42 thrown in production can now be looked up much more easily, by consulting the auto-generated @apollo/client/invariantErrorCodes.js file specific to your @apollo/client version. @benjamn in #6665

    • Make the client field of the MutationResult type non-optional, since it is always provided. @glasser in #6617

    • Allow passing an asynchronous options.renderFunction to getMarkupFromTree. @richardscarrott in #6576

    • Ergonomic improvements for merge and keyArgs functions in cache field policies. @benjamn in #6714

    Apollo Client 3.0.2

    Bug Fixes

    • Avoid duplicating graphql/execution/execute dependency in CommonJS bundle for @apollo/client/link/schema, fixing instanceof errors reported in #6621 and #6614. @benjamn in #6624

    Apollo Client 3.0.1

    Bug Fixes

    • Make sure useQuery onCompleted is not fired when skip is true. @hwillson in #6589

    • Revert changes to peerDependencies in package.json (#6594), which would have allowed using incompatible future versions of graphql and/or react due to overly-permissive >= version constraints. @hwillson in #6605

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Rework interdependencies between @apollo/client/* entry points, so that CommonJS and ESM modules are supported equally well, without any duplication of shared code. <br/> @benjamn in #6656 and #6657

    • Tolerate !== callback functions (like onCompleted and onError) in useQuery options, since those functions are almost always freshly evaluated each time useQuery is called. <br/> @hwillson and @benjamn in #6588

    • Respect context.queryDeduplication if provided, and otherwise fall back to client.deduplication (as before). <br/> @igaloly in #6261 and @Kujawadl in #6526

    • Refactor ObservableQuery#getCurrentResult to reenable immediate delivery of warm cache results. As part of this refactoring, the ApolloCurrentQueryResult type was eliminated in favor of ApolloQueryResult. <br/> @benjamn in #6710

    • Avoid clobbering defaultOptions with undefined values. <br/> @benjamn in #6715

    Improvements

    • Apollo Client will no longer modify options.fetchPolicy unless you pass options.nextFetchPolicy to request an explicit change in FetchPolicy after the current request. Although this is technically a breaking change, options.nextFieldPolicy makes it easy to restore the old behavior (by passing cache-first). <br/> @benjamn in #6712, reverting #6353

    • Errors of the form Invariant Violation: 42 thrown in production can now be looked up much more easily, by consulting the auto-generated @apollo/client/invariantErrorCodes.js file specific to your @apollo/client version. <br/> @benjamn in #6665

    • Make the client field of the MutationResult type non-optional, since it is always provided. <br/> @glasser in #6617

    • Allow passing an asynchronous options.renderFunction to getMarkupFromTree. <br/> @richardscarrott in #6576

    • Ergonomic improvements for merge and keyArgs functions in cache field policies. <br/> @benjamn in #6714

    Open source →
  58. 3.1.0-pre.427 Jul 2020pre-release

    Nothing published for this version

  59. 3.1.0-pre.327 Jul 2020pre-release

    Nothing published for this version

  60. 3.1.0-pre.224 Jul 2020pre-release

    Nothing published for this version