From fc50711d9a4983bb124682b44a894921c5e9b714 Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Mon, 12 Jun 2023 20:06:14 +0200 Subject: [PATCH] fix(cache): use AllFieldsModifier type in cache.modify parameter --- src/cache/inmemory/types.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cache/inmemory/types.ts b/src/cache/inmemory/types.ts index 29a74b87740..286649c8239 100644 --- a/src/cache/inmemory/types.ts +++ b/src/cache/inmemory/types.ts @@ -15,10 +15,10 @@ import type { FieldMergeFunction, } from './policies'; import type { - Modifier, Modifiers, ToReferenceFunction, CanReadFunction, + AllFieldsModifier, } from '../core/types/common'; import type { FragmentRegistryAPI } from './fragmentRegistry'; @@ -49,8 +49,7 @@ export interface NormalizedCache { merge(olderId: string, newerObject: StoreObject): void; merge(olderObject: StoreObject, newerId: string): void; - modify>(dataId: string, fields: Modifiers): boolean; - modify(dataId: string, modifier: Modifier): boolean; + modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; delete(dataId: string, fieldName?: string): boolean; clear(): void;