Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

v2.0.0

Compare
Choose a tag to compare
@kitten kitten released this 12 Dec 16:42
· 3 commits to master since this release
f25882a

Note: The minimum required version of urql for this release is now 1.7.0!

Christmas came early! This version improves performance again by about 25% over 1.2.2. It also now ships with two new features: The populateExchange and automatic garbage collection.

Including the populateExchange is optional. It records all fragments in any active queries, and populates mutation selection sets when the @populate directive is used based on typenames. If your
schema includes viewer fields on mutations, which resolve back to your Query type, you can use this to automatically update your app's data when a mutation is made. (More documentation on this
is coming soon!)

The garbage collection works by utilising an automatic reference counting algorithm rather than a mark & sweep algorithm. We feel this is the best tradeoff to maintain good performance during runtime while minimising the data that is unnecessarily retained in-memory. You don't have to do anything! Graphcache will do its newly added magic in the background.

There are some breaking changes, if you're using cache.resolveConnections or resolveValueOrLink then you now need to use inspectFields and resolveFieldByKey instead. You may also now make use of cache.keyOfField. (More info on #128)

  • ✨ Implement populateExchange (eee #120)
  • Improve type safety of invariant and warning (see #121)
  • Reduce size of populateExchange (see #122)
  • Move more code to KVMap (see #125)
  • Move deletion to setting undefined instead (see #126)
  • Fix multiple edge cases in the relayPagination helper, by @rafeca (see #127)
  • ⚠️ Reimplement data structure and add garbage collection (see #128)
  • Use Closure Compiler (see #131)
  • Switch to using urql/core on 1.7.0 (see #132)