github apollographql/apollo-client v3.2.0
3.2.0

latest releases: v3.10.4, v3.10.3, v3.10.2...
3 years ago

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

Don't miss a new apollo-client release

NewReleases is sending notifications on new releases.