Minor Changes
- Add
cache.link(...)
method to Graphcache. This method may be used in updaters to update links in the cache. It is hence the writing-equivalent ofcache.resolve()
, which previously didn't have any equivalent as such, which meant that onlycache.updateQuery
orcache.writeFragment
could be used, even to update simple relations, by @JoviDeCroock (See #1551) - Add on a generic to
cacheExchange
andofflineExchange
for future, experimental type-generation support, by @JoviDeCroock (See #1562)
Patch Changes
- ⚠️ Fix up internal types in Graphcache to improve their accuracy for catching more edge cases in its implementation. This only affects you if you previously imported any type related to
ScalarObject
from Graphcache which now is a more opaque type. We've also adjusted theNullArray
types to be potentially nested, since lists in GraphQL can be nested arbitarily, which we were covering but didn't reflect in our types, by @kitten (See #1591) - Remove closure-compiler from the build step (See #1570)
- ⚠️ Fix list items being returned as
null
even for non-nullable lists, when the entities are missing in the cache. This could happen when a resolver was added returning entities or their keys. This behaviour is now (correctly) only applied to partial results with schema awareness, by @JoviDeCroock (See #1566) - Allow for the schema subscription and mutationType to be null, by @JoviDeCroock (See #1530)
- Updated dependencies (See #1570, #1509, #1600, and #1515)
- @urql/core@2.1.0