@@ -493,6 +493,11 @@ class Concast<T> extends Observable<T> {
493
493
// @public (undocumented)
494
494
type ConcastSourcesIterable <T > = Iterable <Source <T >>;
495
495
496
+ // Warning: (ae-forgotten-export) The symbol "PreloadQueryFunction" needs to be exported by the entry point index.d.ts
497
+ //
498
+ // @public
499
+ function createQueryPreloader(client : ApolloClient <any >): PreloadQueryFunction ;
500
+
496
501
// @public (undocumented)
497
502
namespace DataProxy {
498
503
// (undocumented)
@@ -1252,6 +1257,11 @@ const OBSERVED_CHANGED_OPTIONS: readonly ["canonizeResults", "context", "errorPo
1252
1257
// @public (undocumented)
1253
1258
type ObservedOptions = Pick <WatchQueryOptions , (typeof OBSERVED_CHANGED_OPTIONS )[number ]>;
1254
1259
1260
+ // @public
1261
+ type OnlyRequiredProperties <T > = {
1262
+ [K in keyof T as {} extends Pick <T , K > ? never : K ]: T [K ];
1263
+ };
1264
+
1255
1265
// @public (undocumented)
1256
1266
type OnQueryUpdated <TResult > = (observableQuery : ObservableQuery <any >, diff : Cache_2 .DiffResult <any >, lastDiff : Cache_2 .DiffResult <any > | undefined ) => boolean | TResult ;
1257
1267
@@ -1291,6 +1301,50 @@ export interface PreloadedQueryRef<TData = unknown, TVariables = unknown> extend
1291
1301
toPromise(): Promise <PreloadedQueryRef <TData , TVariables >>;
1292
1302
}
1293
1303
1304
+ // @public (undocumented)
1305
+ type PreloadQueryFetchPolicy = Extract <WatchQueryFetchPolicy , " cache-first" | " network-only" | " no-cache" | " cache-and-network" >;
1306
+
1307
+ // @public
1308
+ interface PreloadQueryFunction {
1309
+ // Warning: (ae-forgotten-export) The symbol "PreloadQueryOptions" needs to be exported by the entry point index.d.ts
1310
+ // Warning: (ae-forgotten-export) The symbol "PreloadQueryOptionsArg" needs to be exported by the entry point index.d.ts
1311
+ <TData , TVariables extends OperationVariables , TOptions extends Omit <PreloadQueryOptions , " variables" >>(query : DocumentNode | TypedDocumentNode <TData , TVariables >, ... [options ]: PreloadQueryOptionsArg <NoInfer_2 <TVariables >, TOptions >): PreloadedQueryRef <TOptions [" errorPolicy" ] extends " ignore" | " all" ? TOptions [" returnPartialData" ] extends true ? DeepPartial <TData > | undefined : TData | undefined : TOptions [" returnPartialData" ] extends true ? DeepPartial <TData > : TData , TVariables >;
1312
+ <TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options : PreloadQueryOptions <NoInfer_2 <TVariables >> & {
1313
+ returnPartialData: true ;
1314
+ errorPolicy: " ignore" | " all" ;
1315
+ }): PreloadedQueryRef <DeepPartial <TData > | undefined , TVariables >;
1316
+ <TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options : PreloadQueryOptions <NoInfer_2 <TVariables >> & {
1317
+ errorPolicy: " ignore" | " all" ;
1318
+ }): PreloadedQueryRef <TData | undefined , TVariables >;
1319
+ <TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options : PreloadQueryOptions <NoInfer_2 <TVariables >> & {
1320
+ returnPartialData: true ;
1321
+ }): PreloadedQueryRef <DeepPartial <TData >, TVariables >;
1322
+ <TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, ... [options ]: PreloadQueryOptionsArg <NoInfer_2 <TVariables >>): PreloadedQueryRef <TData , TVariables >;
1323
+ }
1324
+
1325
+ // Warning: (ae-forgotten-export) The symbol "VariablesOption" needs to be exported by the entry point index.d.ts
1326
+ //
1327
+ // @public (undocumented)
1328
+ type PreloadQueryOptions <TVariables extends OperationVariables = OperationVariables > = {
1329
+ canonizeResults? : boolean ;
1330
+ context? : DefaultContext ;
1331
+ errorPolicy? : ErrorPolicy ;
1332
+ fetchPolicy? : PreloadQueryFetchPolicy ;
1333
+ returnPartialData? : boolean ;
1334
+ refetchWritePolicy? : RefetchWritePolicy ;
1335
+ } & VariablesOption <TVariables >;
1336
+
1337
+ // Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts
1338
+ //
1339
+ // @public (undocumented)
1340
+ type PreloadQueryOptionsArg <TVariables extends OperationVariables , TOptions = unknown > = [TVariables ] extends [never ] ? [
1341
+ options ? : PreloadQueryOptions <never > & TOptions
1342
+ ] : {} extends OnlyRequiredProperties <TVariables > ? [
1343
+ options ? : PreloadQueryOptions <NoInfer_2 <TVariables >> & Omit <TOptions , " variables" >
1344
+ ] : [
1345
+ options : PreloadQueryOptions <NoInfer_2 <TVariables >> & Omit <TOptions , " variables" >
1346
+ ];
1347
+
1294
1348
// @public (undocumented)
1295
1349
type Primitive = null | undefined | string | number | boolean | symbol | bigint ;
1296
1350
@@ -1692,7 +1746,6 @@ interface SharedWatchQueryOptions<TVariables extends OperationVariables, TData>
1692
1746
// @deprecated
1693
1747
partialRefetch? : boolean ;
1694
1748
pollInterval? : number ;
1695
- // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts
1696
1749
refetchWritePolicy? : RefetchWritePolicy ;
1697
1750
returnPartialData? : boolean ;
1698
1751
skipPollAttempt? : () => boolean ;
@@ -2049,6 +2102,17 @@ interface UseSuspenseQueryResult<TData = unknown, TVariables extends OperationVa
2049
2102
subscribeToMore: SubscribeToMoreFunction <TData , TVariables >;
2050
2103
}
2051
2104
2105
+ // @public (undocumented)
2106
+ type VariablesOption <TVariables extends OperationVariables > = [
2107
+ TVariables
2108
+ ] extends [never ] ? {
2109
+ variables? : Record <string , never >;
2110
+ } : {} extends OnlyRequiredProperties <TVariables > ? {
2111
+ variables? : TVariables ;
2112
+ } : {
2113
+ variables: TVariables ;
2114
+ };
2115
+
2052
2116
// @public
2053
2117
interface WatchFragmentOptions <TData , TVars > {
2054
2118
// @deprecated (undocumented)
@@ -2081,6 +2145,10 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
2081
2145
2082
2146
// @public (undocumented)
2083
2147
interface WrappableHooks {
2148
+ // Warning: (ae-forgotten-export) The symbol "createQueryPreloader" needs to be exported by the entry point index.d.ts
2149
+ //
2150
+ // (undocumented)
2151
+ createQueryPreloader: typeof createQueryPreloader ;
2084
2152
// Warning: (ae-forgotten-export) The symbol "useBackgroundQuery" needs to be exported by the entry point index.d.ts
2085
2153
//
2086
2154
// (undocumented)
@@ -2141,6 +2209,8 @@ export function wrapQueryRef<TData, TVariables extends OperationVariables>(inter
2141
2209
// src/react/hooks/useBackgroundQuery.ts:38:3 - (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts
2142
2210
// src/react/hooks/useBackgroundQuery.ts:54:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts
2143
2211
// src/react/hooks/useBackgroundQuery.ts:78:4 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts
2212
+ // src/react/query-preloader/createQueryPreloader.ts:145:3 - (ae-forgotten-export) The symbol "PreloadQueryFetchPolicy" needs to be exported by the entry point index.d.ts
2213
+ // src/react/query-preloader/createQueryPreloader.ts:167:5 - (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts
2144
2214
2145
2215
// (No @packageDocumentation comment for this package)
2146
2216
0 commit comments