diff --git a/src/cache/cache.ts b/src/cache/cache.ts
index 43a74bd..20783d3 100644
--- a/src/cache/cache.ts
+++ b/src/cache/cache.ts
@@ -176,6 +176,12 @@ export class ClientCache {
typeof value.__typename === "string" &&
value.__typename.endsWith("Connection")
) {
+ value.__connectionCacheKey = cacheKey.description;
+ value.__connectionCachePath = [
+ [...writePath, fieldNameWithArguments].map((item) =>
+ typeof item === "symbol" ? { symbol: item.description } : item,
+ ),
+ ];
value.__connectionArguments = variables;
}
@@ -207,4 +213,37 @@ export class ClientCache {
writePath.push(pathCopy.pop() as PropertyKey);
}
}
+
+ update(
+ cacheKey: symbol,
+ path: (symbol | string)[],
+ updater: (value: A) => Partial,
+ ) {
+ this.get(cacheKey).map((cachedAncestor) => {
+ const value = path.reduce