Releases: urql-graphql/urql-exchange-graphcache
v2.1.0
This release adds support for cache persistence which is bringing us one step closer to
full offline-support, which we hope to bring you soon.
It also allows wonka@^4.0.0
as a dependency to be compatible with [email protected]
. It also fixes a couple of issues in our
new populateExchange
.
- Refactor internal store code and simplify
Store
(see #134) - ✨ Implement store persistence support (see #137)
- ✨ Apply GC to store persistence (see #138)
- Remove unused case where scalars are written from an API when links are expected (see #142)
⚠️ Add support for resolvers causing cache misses (see #143)⚠️ Fix nested types (e.g.[Item!]!
) inpopulateExchange
(see #150)- Fix duplicate fragments in
populateExchange
output (see #151) - Allow
wonka@^3.2.1||^4.0.0
to be used (see #153)
v2.0.0
Note: The minimum required version of
urql
for this release is now1.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
andwarning
(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
on1.7.0
(see #132)
v1.2.2
This patch replaces pessimism
(our former underlying data structure) with a smaller implementation
that just uses Map
s, since we weren't relying on any immutability internally. This cuts down
on bundlesize and massively on GC-pressure, which provides a large speedup on low-end devices.
- Replace Pessimism with mutable store to prevent excessive GC work (see #117)
v1.2.1
v1.2.0
v1.1.2
v1.1.1
This is a minor release since it increases the peer dependency of urql
to >= 1.6.0
, due to the addition
of the stale
flag to partial responses and cache-and-network
responses. This flag is useful to check
whether more requests are being made in the background by @urql/exchange-graphcache
.
Additionally, this release adds a small stack to every error and warning that indicates where an
error has occured. It lists out the query and all subsequent fragments it has been traversing
so that errors and warnings can be traced more easily.
v1.0.3
v1.0.2
v1.0.1
- Trims down the size by 100 bytes (see #96)
- Include the
/extras
build in the published version (see #97) - Invariant and warnings will now have an error code associated with a more elabore explanation (see #99)
- Invariant errors will now be included in your production bundle (see #100)
- Fixes the relayPagination helper to correctly return partial results (see #101)
- Add special case to relayPagination for first and last during inwards merge (see #102)