Skip to content

@apollo/[email protected]

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Sep 15:08
· 22 commits to main since this release
c5d5630

Minor Changes

  • #12934 54ab6d9 Thanks @jerelmiller! - Don't set the fallback value of a @client field to null when a read function is defined. Instead the read function will be called with an existing value of undefined to allow default arguments to be used to set the returned value.

    When a read function is not defined nor is there a defined resolver for the field, warn and set the value to null only in that instance.

  • #12934 54ab6d9 Thanks @jerelmiller! - Add an abstract resolvesClientField function to ApolloCache that can be used by caches to tell LocalState if it can resolve a @client field when a local resolver is not defined.

    LocalState will emit a warning and set a fallback value of null when no local resolver is defined and resolvesClientField returns false, or isn't defined. Returning true from resolvesClientField signals that a mechanism in the cache will set the field value. In this case, LocalState won't set the field value.

Patch Changes

  • #12915 c97b145 Thanks @phryneas! - Create mechanism to add experimental features to Apollo Client

  • #12934 54ab6d9 Thanks @jerelmiller! - Ensure LocalState doesn't try to read from the cache when using a no-cache fetch policy.

  • #12934 54ab6d9 Thanks @jerelmiller! - Warn when using a no-cache fetch policy without a local resolver defined. no-cache queries do not read or write to the cache which meant no-cache queries are silently incomplete when the @client field value was handled by a cache read function.