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

latest releases: @urql/solid@0.1.0, @urql/next@1.1.2, @urql/exchange-graphcache@7.1.3...
14 months ago

Minor Changes

  • Implement local directives. It’s now possible to add client-only directives to queries by adding them to the cacheExchange’s new directives option.
    Directives accept an object of their arguments and return a resolver. When a field is annotated with
    a resolver, e.g. @_optional or @_required, their resolvers from the directives config are
    executed. This means it’s now possible to use @_relayPagination for example, by passing adding
    the relayPagination helper to the config.
    Due to the change in #3317, any directive in
    queries that’s prefixed with an underscore (_) is only visible to Graphcache and not the API.
    Submitted by undefined (See #3306)

Patch Changes

  • Use new FormattedNode / formatDocument functionality added to @urql/core to slightly speed up directive processing by using the client-side _directives dictionary that formatDocument adds
    Submitted by @kitten (See #3317)
  • Allow offlineExchange to once again issue all request policies, instead of mapping them to cache-first. When replaying operations after rehydrating it will now prioritise network policies, and before rehydrating receiving a network result will prevent a network request from being issued again
    Submitted by @kitten (See #3308)
  • Add OperationContext.optimistic flag as an internal indication on whether a mutation triggered an optimistic update in @urql/exchange-graphcache's cacheExchange
    Submitted by @kitten (See #3308)
  • Updated dependencies (See #3317 and #3308)
    • @urql/core@4.1.0

Don't miss a new urql release

NewReleases is sending notifications on new releases.