Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 10 Feb 17:49
· 785 commits to main since this release
8894a86

Major Changes

  • Add improved error awareness to Graphcache. When Graphcache now receives a GraphQLError (via a CombinedError) it checks whether the GraphQLError's path matches up with null values in the data. Any null values that the write operation now sees in the data will be replaced with a "cache miss" value (i.e. undefined) when it has an associated error. This means that errored fields from your GraphQL API will be marked as uncached and won't be cached. Instead the client will now attempt a refetch of the data so that errors aren't preventing future refetches or with schema awareness it will attempt a refetch automatically. Additionally, the updates functions will now be able to check whether the current field has any errors associated with it with info.error, by @kitten (See #1356)

Minor Changes

  • Allow schema option to be passed with a partial introspection result that only contains queryType, mutationType, and subscriptionType with their respective names. This allows you to pass { __schema: { queryType: { name: 'Query' } } } and the likes to Graphcache's cacheExchange to alter the default root names without enabling full schema awareness, by @kitten (See #1379)

Patch Changes