This changes the expected behaviour for when dependencies are recorded for caches accesses.
Note: Dependencies are basically entity or field keys marking a cache read or write. When a cache write updates a dependency, then all cache reads (i.e. queries) that have the same cache dependency will be updated accordingly, i.e. re-queried. This is how Graphcache issues updates to queries after cache writes.
While this wasn't a bug, any usage of cache.resolve(entity, '__typename') wouldn't actually record a dependency, which could cause confusion. The exception has now been removed.
Set of changes
Remove dependency exception for accessing __typename on entities
Summary
This changes the expected behaviour for when dependencies are recorded for caches accesses.
While this wasn't a bug, any usage of
cache.resolve(entity, '__typename')
wouldn't actually record a dependency, which could cause confusion. The exception has now been removed.Set of changes
__typename
on entities