You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the docs, I expected to see both gc and evict as available methods on the ApolloCache object.
Actual outcome:
The TypeScript definitions for ApolloCache seem to be missing the gc method. This means that I can't see the gc method in intellisense or use the method without workarounds (such as casting cache to type any).
How to reproduce the issue:
In my React component, I grabbed a reference to the cache like so:
const { cache } = useApolloClient();
This returns me an ApolloCache object. I see evict in the list of available methods, but not gc.
The text was updated successfully, but these errors were encountered:
mattwilson1024
changed the title
gc function missing from TypeScript definitions for ApolloCache ]3.0.0-beta.36gc function missing from TypeScript definitions for ApolloCache (3.0.0-beta.36)
Feb 19, 2020
@hwillson This seems like a quick follow-up to #5956? The default implementation of ApolloCache#gc can just return [], and InMemoryCache will override it with the real implementation.
Intended outcome:
I am trying out the new
evict
andgc
methods introduced in Apollo Client 3, as described in the docs Garbage collection and cache eviction docs.Based on the docs, I expected to see both
gc
andevict
as available methods on theApolloCache
object.Actual outcome:
The TypeScript definitions for
ApolloCache
seem to be missing thegc
method. This means that I can't see thegc
method in intellisense or use the method without workarounds (such as castingcache
to typeany
).How to reproduce the issue:
In my React component, I grabbed a reference to the cache like so:
This returns me an ApolloCache object. I see
evict
in the list of available methods, but notgc
.Versions
The text was updated successfully, but these errors were encountered: