github urql-graphql/urql @urql/exchange-graphcache@4.0.0

latest releases: @urql/vue@1.3.2, @urql/vue@1.3.1, @urql/vue@1.3.0...
3 years ago

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

Don't miss a new urql release

NewReleases is sending notifications on new releases.