@@ -8,9 +8,10 @@ import type { DocumentNode } from 'graphql';
8
8
import type { FieldNode } from ' graphql' ;
9
9
import type { FragmentDefinitionNode } from ' graphql' ;
10
10
import type { InlineFragmentNode } from ' graphql' ;
11
+ import { Observable } from ' zen-observable-ts' ;
11
12
import type { SelectionSetNode } from ' graphql' ;
12
13
import { Trie } from ' @wry/trie' ;
13
- import type { TypedDocumentNode } from ' @graphql-typed-document-node/core' ;
14
+ import { TypedDocumentNode } from ' @graphql-typed-document-node/core' ;
14
15
15
16
// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts
16
17
//
@@ -63,6 +64,8 @@ export abstract class ApolloCache<TSerialized> implements DataProxy {
63
64
updateQuery<TData = any , TVariables = any >(options : Cache_2 .UpdateQueryOptions <TData , TVariables >, update : (data : TData | null ) => TData | null | void ): TData | null ;
64
65
// (undocumented)
65
66
abstract watch<TData = any , TVariables = any >(watch : Cache_2 .WatchOptions <TData , TVariables >): () => void ;
67
+ // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
68
+ watchFragment<TData = any , TVars = OperationVariables >(options : WatchFragmentOptions <TData , TVars >): Observable <WatchFragmentResult <TData >>;
66
69
// (undocumented)
67
70
abstract write<TData = any , TVariables = any >(write : Cache_2 .WriteOptions <TData , TVariables >): Reference | undefined ;
68
71
// (undocumented)
@@ -234,7 +237,7 @@ export namespace DataProxy {
234
237
}
235
238
// (undocumented)
236
239
export interface ReadFragmentOptions <TData , TVariables > extends Fragment <TVariables , TData > {
237
- // @deprecated (undocumented)
240
+ // @deprecated
238
241
canonizeResults? : boolean ;
239
242
optimistic? : boolean ;
240
243
returnPartialData? : boolean ;
@@ -274,6 +277,40 @@ export interface DataProxy {
274
277
writeQuery<TData = any , TVariables = any >(options : DataProxy .WriteQueryOptions <TData , TVariables >): Reference | undefined ;
275
278
}
276
279
280
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts
281
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts
282
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts
283
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts
284
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts
285
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts
286
+ //
287
+ // @public (undocumented)
288
+ type DeepPartial <T > = T extends DeepPartialPrimitive ? T : T extends Map <infer TKey , infer TValue > ? DeepPartialMap <TKey , TValue > : T extends ReadonlyMap <infer TKey , infer TValue > ? DeepPartialReadonlyMap <TKey , TValue > : T extends Set <infer TItem > ? DeepPartialSet <TItem > : T extends ReadonlySet <infer TItem > ? DeepPartialReadonlySet <TItem > : T extends (... args : any []) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray <infer TItem >) ? TItem [] extends (T ) ? readonly TItem [] extends T ? ReadonlyArray <DeepPartial <TItem | undefined >> : Array <DeepPartial <TItem | undefined >> : DeepPartialObject <T > : DeepPartialObject <T > : unknown ;
289
+
290
+ // Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts
291
+ //
292
+ // @public (undocumented)
293
+ type DeepPartialMap <TKey , TValue > = {} & Map <DeepPartial <TKey >, DeepPartial <TValue >>;
294
+
295
+ // @public (undocumented)
296
+ type DeepPartialObject <T extends object > = {
297
+ [K in keyof T ]? : DeepPartial <T [K ]>;
298
+ };
299
+
300
+ // Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts
301
+ //
302
+ // @public (undocumented)
303
+ type DeepPartialPrimitive = Primitive | Date | RegExp ;
304
+
305
+ // @public (undocumented)
306
+ type DeepPartialReadonlyMap <TKey , TValue > = {} & ReadonlyMap <DeepPartial <TKey >, DeepPartial <TValue >>;
307
+
308
+ // @public (undocumented)
309
+ type DeepPartialReadonlySet <T > = {} & ReadonlySet <DeepPartial <T >>;
310
+
311
+ // @public (undocumented)
312
+ type DeepPartialSet <T > = {} & Set <DeepPartial <T >>;
313
+
277
314
// Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts
278
315
//
279
316
// @public (undocumented)
@@ -533,8 +570,6 @@ export class InMemoryCache extends ApolloCache<NormalizedCacheObject> {
533
570
protected broadcastWatches(options ? : BroadcastOptions ): void ;
534
571
// (undocumented)
535
572
protected config: InMemoryCacheConfig ;
536
- // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
537
- //
538
573
// (undocumented)
539
574
diff<TData , TVariables extends OperationVariables = any >(options : Cache_2 .DiffOptions <TData , TVariables >): Cache_2 .DiffResult <TData >;
540
575
// (undocumented)
@@ -824,6 +859,9 @@ export type PossibleTypesMap = {
824
859
[supertype : string ]: string [];
825
860
};
826
861
862
+ // @public (undocumented)
863
+ type Primitive = null | undefined | string | number | boolean | symbol | bigint ;
864
+
827
865
// @public (undocumented)
828
866
type ReactiveListener <T > = (value : T ) => any ;
829
867
@@ -936,6 +974,28 @@ export type TypePolicy = {
936
974
};
937
975
};
938
976
977
+ // @public
978
+ export interface WatchFragmentOptions <TData , TVars > {
979
+ // @deprecated (undocumented)
980
+ canonizeResults? : boolean ;
981
+ fragment: DocumentNode | TypedDocumentNode <TData , TVars >;
982
+ fragmentName? : string ;
983
+ from: StoreObject | Reference | string ;
984
+ optimistic? : boolean ;
985
+ variables? : TVars ;
986
+ }
987
+
988
+ // @public
989
+ export type WatchFragmentResult <TData > = {
990
+ data: TData ;
991
+ complete: true ;
992
+ missing? : never ;
993
+ } | {
994
+ data: DeepPartial <TData >;
995
+ complete: false ;
996
+ missing: MissingTree ;
997
+ };
998
+
939
999
// @public (undocumented)
940
1000
interface WriteContext extends ReadMergeModifyContext {
941
1001
// (undocumented)
0 commit comments