@@ -1018,6 +1018,38 @@ export type LazyQueryResultTuple<TData, TVariables extends OperationVariables> =
1018
1018
// @public (undocumented)
1019
1019
type Listener <TData > = (promise : Promise <ApolloQueryResult <TData >>) => void ;
1020
1020
1021
+ // @public (undocumented)
1022
+ export type LoadableQueryHookFetchPolicy = Extract <WatchQueryFetchPolicy , " cache-first" | " network-only" | " no-cache" | " cache-and-network" >;
1023
+
1024
+ // @public (undocumented)
1025
+ export interface LoadableQueryHookOptions {
1026
+ // (undocumented)
1027
+ canonizeResults? : boolean ;
1028
+ // (undocumented)
1029
+ client? : ApolloClient <any >;
1030
+ // (undocumented)
1031
+ context? : Context ;
1032
+ // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts
1033
+ //
1034
+ // (undocumented)
1035
+ errorPolicy? : ErrorPolicy ;
1036
+ // (undocumented)
1037
+ fetchPolicy? : LoadableQueryHookFetchPolicy ;
1038
+ // (undocumented)
1039
+ queryKey? : string | number | any [];
1040
+ // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts
1041
+ //
1042
+ // (undocumented)
1043
+ refetchWritePolicy? : RefetchWritePolicy ;
1044
+ // (undocumented)
1045
+ returnPartialData? : boolean ;
1046
+ }
1047
+
1048
+ // Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts
1049
+ //
1050
+ // @public (undocumented)
1051
+ export type LoadQueryFunction <TVariables extends OperationVariables > = (... args : [TVariables ] extends [never ] ? [] : {} extends OnlyRequiredProperties <TVariables > ? [variables ? : TVariables ] : [variables : TVariables ]) => void ;
1052
+
1021
1053
// @public (undocumented)
1022
1054
class LocalState <TCacheShape > {
1023
1055
// Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts
@@ -1119,8 +1151,6 @@ interface MutationBaseOptions<TData = any, TVariables = OperationVariables, TCon
1119
1151
awaitRefetchQueries? : boolean ;
1120
1152
// (undocumented)
1121
1153
context? : TContext ;
1122
- // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts
1123
- //
1124
1154
// (undocumented)
1125
1155
errorPolicy? : ErrorPolicy ;
1126
1156
// Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts
@@ -1361,6 +1391,11 @@ export interface OnDataOptions<TData = any> {
1361
1391
data: SubscriptionResult <TData >;
1362
1392
}
1363
1393
1394
+ // @public (undocumented)
1395
+ type OnlyRequiredProperties <T > = {
1396
+ [K in keyof T as {} extends Pick <T , K > ? never : K ]: T [K ];
1397
+ };
1398
+
1364
1399
// @public (undocumented)
1365
1400
type OnQueryUpdated <TResult > = (observableQuery : ObservableQuery <any >, diff : Cache_2 .DiffResult <any >, lastDiff : Cache_2 .DiffResult <any > | undefined ) => boolean | TResult ;
1366
1401
@@ -1800,6 +1835,9 @@ type RequestHandler = (operation: Operation, forward: NextLink) => Observable<Fe
1800
1835
// @public (undocumented)
1801
1836
export const resetApolloContext: typeof getApolloContext ;
1802
1837
1838
+ // @public (undocumented)
1839
+ type ResetFunction = () => void ;
1840
+
1803
1841
// @public (undocumented)
1804
1842
type Resolver = (rootValue ? : any , args ? : any , context ? : any , info ? : {
1805
1843
field: FieldNode ;
@@ -2092,6 +2130,39 @@ export type UseFragmentResult<TData> = {
2092
2130
// @public (undocumented)
2093
2131
export function useLazyQuery<TData = any , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options ? : LazyQueryHookOptions <NoInfer <TData >, NoInfer <TVariables >>): LazyQueryResultTuple <TData , TVariables >;
2094
2132
2133
+ // @public (undocumented)
2134
+ export function useLoadableQuery<TData , TVariables extends OperationVariables , TOptions extends LoadableQueryHookOptions >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options ? : LoadableQueryHookOptions & TOptions ): UseLoadableQueryResult <TOptions [" errorPolicy" ] extends " ignore" | " all" ? TOptions [" returnPartialData" ] extends true ? DeepPartial <TData > | undefined : TData | undefined : TOptions [" returnPartialData" ] extends true ? DeepPartial <TData > : TData , TVariables >;
2135
+
2136
+ // @public (undocumented)
2137
+ export function useLoadableQuery<TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options : LoadableQueryHookOptions & {
2138
+ returnPartialData: true ;
2139
+ errorPolicy: " ignore" | " all" ;
2140
+ }): UseLoadableQueryResult <DeepPartial <TData > | undefined , TVariables >;
2141
+
2142
+ // @public (undocumented)
2143
+ export function useLoadableQuery<TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options : LoadableQueryHookOptions & {
2144
+ errorPolicy: " ignore" | " all" ;
2145
+ }): UseLoadableQueryResult <TData | undefined , TVariables >;
2146
+
2147
+ // @public (undocumented)
2148
+ export function useLoadableQuery<TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options : LoadableQueryHookOptions & {
2149
+ returnPartialData: true ;
2150
+ }): UseLoadableQueryResult <DeepPartial <TData >, TVariables >;
2151
+
2152
+ // @public (undocumented)
2153
+ export function useLoadableQuery<TData = unknown , TVariables extends OperationVariables = OperationVariables >(query : DocumentNode | TypedDocumentNode <TData , TVariables >, options ? : LoadableQueryHookOptions ): UseLoadableQueryResult <TData , TVariables >;
2154
+
2155
+ // @public (undocumented)
2156
+ export type UseLoadableQueryResult <TData = unknown , TVariables extends OperationVariables = OperationVariables > = [
2157
+ LoadQueryFunction <TVariables >,
2158
+ QueryReference <TData > | null ,
2159
+ {
2160
+ fetchMore: FetchMoreFunction <TData , TVariables >;
2161
+ refetch: RefetchFunction <TData , TVariables >;
2162
+ reset: ResetFunction ;
2163
+ }
2164
+ ];
2165
+
2095
2166
// @public (undocumented)
2096
2167
export function useMutation<TData = any , TVariables = OperationVariables , TContext = Context , TCache extends ApolloCache <any > = ApolloCache <any >>(mutation : DocumentNode | TypedDocumentNode <TData , TVariables >, options ? : MutationHookOptions <NoInfer <TData >, NoInfer <TVariables >, TContext , TCache >): MutationTuple <TData , TVariables , TContext , TCache >;
2097
2168
@@ -2193,8 +2264,6 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
2193
2264
//
2194
2265
// (undocumented)
2195
2266
nextFetchPolicy? : WatchQueryFetchPolicy | ((this : WatchQueryOptions <TVariables , TData >, currentFetchPolicy : WatchQueryFetchPolicy , context : NextFetchPolicyContext <TData , TVariables >) => WatchQueryFetchPolicy );
2196
- // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts
2197
- //
2198
2267
// (undocumented)
2199
2268
refetchWritePolicy? : RefetchWritePolicy ;
2200
2269
}
@@ -2221,6 +2290,7 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
2221
2290
// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
2222
2291
// src/react/hooks/useBackgroundQuery.ts:26:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts
2223
2292
// src/react/hooks/useBackgroundQuery.ts:27:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts
2293
+ // src/react/hooks/useLoadableQuery.ts:51:5 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts
2224
2294
// src/utilities/graphql/DocumentTransform.ts:130:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts
2225
2295
2226
2296
// (No @packageDocumentation comment for this package)
0 commit comments