diff --git a/.api-reports/api-report-react.md b/.api-reports/api-report-react.md index 1eec2b59c0f..01727104af1 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -901,33 +901,6 @@ interface IncrementalPayload { path: Path; } -// @public (undocumented) -export type InteractiveQueryHookFetchPolicy = Extract; - -// @public (undocumented) -export interface InteractiveQueryHookOptions { - // (undocumented) - canonizeResults?: boolean; - // (undocumented) - client?: ApolloClient; - // (undocumented) - context?: Context; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - errorPolicy?: ErrorPolicy; - // (undocumented) - fetchPolicy?: InteractiveQueryHookFetchPolicy; - // (undocumented) - queryKey?: string | number | any[]; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchWritePolicy?: RefetchWritePolicy; - // (undocumented) - returnPartialData?: boolean; -} - // @public (undocumented) class InternalQueryReference { // Warning: (ae-forgotten-export) The symbol "InternalQueryReferenceOptions" needs to be exported by the entry point index.d.ts @@ -1045,6 +1018,38 @@ export type LazyQueryResultTuple = // @public (undocumented) type Listener = (promise: Promise>) => void; +// @public (undocumented) +export type LoadableQueryHookFetchPolicy = Extract; + +// @public (undocumented) +export interface LoadableQueryHookOptions { + // (undocumented) + canonizeResults?: boolean; + // (undocumented) + client?: ApolloClient; + // (undocumented) + context?: Context; + // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts + // + // (undocumented) + errorPolicy?: ErrorPolicy; + // (undocumented) + fetchPolicy?: LoadableQueryHookFetchPolicy; + // (undocumented) + queryKey?: string | number | any[]; + // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts + // + // (undocumented) + refetchWritePolicy?: RefetchWritePolicy; + // (undocumented) + returnPartialData?: boolean; +} + +// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type LoadQuery = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties ? [variables?: TVariables] : [variables: TVariables]) => void; + // @public (undocumented) class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts @@ -1388,6 +1393,11 @@ export interface OnDataOptions { data: SubscriptionResult; } +// @public (undocumented) +type OnlyRequiredProperties = { + [K in keyof T as {} extends Pick ? never : K]: T[K]; +}; + // @public (undocumented) type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; @@ -2119,6 +2129,40 @@ export type UseFragmentResult = { // @public (undocumented) export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions, NoInfer>): LazyQueryResultTuple; +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): UseLoadableQueryResult | undefined, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + errorPolicy: "ignore" | "all"; +}): UseLoadableQueryResult; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + returnPartialData: true; +}): UseLoadableQueryResult, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions): UseLoadableQueryResult; + +// Warning: (ae-forgotten-export) The symbol "LoadQuery" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type UseLoadableQueryResult = [ +QueryReference | null, +LoadQuery, + { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; +} +]; + // @public (undocumented) export function useMutation = ApolloCache>(mutation: DocumentNode | TypedDocumentNode, options?: MutationHookOptions, NoInfer, TContext, TCache>): MutationTuple; diff --git a/.api-reports/api-report-react_hooks.md b/.api-reports/api-report-react_hooks.md index f5909f15f50..520ae803f05 100644 --- a/.api-reports/api-report-react_hooks.md +++ b/.api-reports/api-report-react_hooks.md @@ -969,6 +969,40 @@ type LazyQueryResultTuple = [LazyQ // @public (undocumented) type Listener = (promise: Promise>) => void; +// @public (undocumented) +type LoadableQueryHookFetchPolicy = Extract; + +// @public (undocumented) +interface LoadableQueryHookOptions { + // (undocumented) + canonizeResults?: boolean; + // (undocumented) + client?: ApolloClient; + // (undocumented) + context?: DefaultContext; + // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts + // + // (undocumented) + errorPolicy?: ErrorPolicy; + // Warning: (ae-forgotten-export) The symbol "LoadableQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts + // + // (undocumented) + fetchPolicy?: LoadableQueryHookFetchPolicy; + // (undocumented) + queryKey?: string | number | any[]; + // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts + // + // (undocumented) + refetchWritePolicy?: RefetchWritePolicy; + // (undocumented) + returnPartialData?: boolean; +} + +// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type LoadQuery = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties ? [variables?: TVariables] : [variables: TVariables]) => void; + // @public (undocumented) class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts @@ -1072,8 +1106,6 @@ interface MutationBaseOptions { data: SubscriptionResult; } +// @public (undocumented) +type OnlyRequiredProperties = { + [K in keyof T as {} extends Pick ? never : K]: T[K]; +}; + // @public (undocumented) type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; @@ -1981,6 +2018,42 @@ export type UseFragmentResult = { // @public (undocumented) export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions, NoInfer>): LazyQueryResultTuple; +// Warning: (ae-forgotten-export) The symbol "LoadableQueryHookOptions" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): UseLoadableQueryResult | undefined, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + errorPolicy: "ignore" | "all"; +}): UseLoadableQueryResult; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + returnPartialData: true; +}): UseLoadableQueryResult, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions): UseLoadableQueryResult; + +// Warning: (ae-forgotten-export) The symbol "LoadQuery" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type UseLoadableQueryResult = [ +QueryReference | null, +LoadQuery, + { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; +} +]; + // Warning: (ae-forgotten-export) The symbol "MutationHookOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationTuple" needs to be exported by the entry point index.d.ts // @@ -2089,8 +2162,6 @@ interface WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // // (undocumented) refetchWritePolicy?: RefetchWritePolicy; } diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 4205216998c..bc872604e50 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -1255,29 +1255,6 @@ export interface InMemoryCacheConfig extends ApolloReducerConfig { typePolicies?: TypePolicies; } -// @public (undocumented) -export type InteractiveQueryHookFetchPolicy = Extract; - -// @public (undocumented) -export interface InteractiveQueryHookOptions { - // (undocumented) - canonizeResults?: boolean; - // (undocumented) - client?: ApolloClient; - // (undocumented) - context?: DefaultContext; - // (undocumented) - errorPolicy?: ErrorPolicy; - // (undocumented) - fetchPolicy?: InteractiveQueryHookFetchPolicy; - // (undocumented) - queryKey?: string | number | any[]; - // (undocumented) - refetchWritePolicy?: RefetchWritePolicy; - // (undocumented) - returnPartialData?: boolean; -} - // @public (undocumented) class InternalQueryReference { // Warning: (ae-forgotten-export) The symbol "InternalQueryReferenceOptions" needs to be exported by the entry point index.d.ts @@ -1441,6 +1418,34 @@ export type LazyQueryResultTuple = // @public (undocumented) type Listener = (promise: Promise>) => void; +// @public (undocumented) +export type LoadableQueryHookFetchPolicy = Extract; + +// @public (undocumented) +export interface LoadableQueryHookOptions { + // (undocumented) + canonizeResults?: boolean; + // (undocumented) + client?: ApolloClient; + // (undocumented) + context?: DefaultContext; + // (undocumented) + errorPolicy?: ErrorPolicy; + // (undocumented) + fetchPolicy?: LoadableQueryHookFetchPolicy; + // (undocumented) + queryKey?: string | number | any[]; + // (undocumented) + refetchWritePolicy?: RefetchWritePolicy; + // (undocumented) + returnPartialData?: boolean; +} + +// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type LoadQuery = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties ? [variables?: TVariables] : [variables: TVariables]) => void; + // @public (undocumented) class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts @@ -1870,6 +1875,11 @@ export interface OnDataOptions { data: SubscriptionResult; } +// @public (undocumented) +type OnlyRequiredProperties = { + [K in keyof T as {} extends Pick ? never : K]: T[K]; +}; + // @public (undocumented) export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; @@ -2761,6 +2771,40 @@ export type UseFragmentResult = { // @public (undocumented) export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions, NoInfer>): LazyQueryResultTuple; +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): UseLoadableQueryResult | undefined, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + errorPolicy: "ignore" | "all"; +}): UseLoadableQueryResult; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { + returnPartialData: true; +}): UseLoadableQueryResult, TVariables>; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions): UseLoadableQueryResult; + +// Warning: (ae-forgotten-export) The symbol "LoadQuery" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type UseLoadableQueryResult = [ +QueryReference | null, +LoadQuery, + { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; +} +]; + // @public (undocumented) export function useMutation = ApolloCache>(mutation: DocumentNode | TypedDocumentNode, options?: MutationHookOptions, NoInfer, TContext, TCache>): MutationTuple;