import type { ApolloClient, ApolloQueryResult, DocumentNode, OperationVariables, TypedDocumentNode, FetchMoreQueryOptions, WatchQueryOptions } from "../../core/index.js"; import { ApolloError, NetworkStatus } from "../../core/index.js"; import type { DeepPartial } from "../../utilities/index.js"; import type { SuspenseQueryHookOptions, ObservableQueryFields, NoInfer } from "../types/types.js"; import type { SkipToken } from "./constants.js"; export interface UseSuspenseQueryResult { client: ApolloClient; data: TData; error: ApolloError | undefined; fetchMore: FetchMoreFunction; networkStatus: NetworkStatus; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } export type FetchMoreFunction = (fetchMoreOptions: FetchMoreQueryOptions & { updateQuery?: (previousQueryResult: TData, options: { fetchMoreResult: TData; variables: TVariables; }) => TData; }) => Promise>; export type RefetchFunction = ObservableQueryFields["refetch"]; export type SubscribeToMoreFunction = ObservableQueryFields["subscribeToMore"]; export declare function useSuspenseQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer> & TOptions): UseSuspenseQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? TOptions["skip"] extends boolean ? DeepPartial | undefined : DeepPartial : TOptions["skip"] extends boolean ? TData | undefined : TData, TVariables>; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer> & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): UseSuspenseQueryResult | undefined, TVariables>; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer> & { errorPolicy: "ignore" | "all"; }): UseSuspenseQueryResult; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer> & { skip: boolean; returnPartialData: true; }): UseSuspenseQueryResult | undefined, TVariables>; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer> & { returnPartialData: true; }): UseSuspenseQueryResult, TVariables>; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer> & { skip: boolean; }): UseSuspenseQueryResult; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer>): UseSuspenseQueryResult; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (SuspenseQueryHookOptions, NoInfer> & { returnPartialData: true; })): UseSuspenseQueryResult | undefined, TVariables>; export declare function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | SuspenseQueryHookOptions, NoInfer>): UseSuspenseQueryResult; export declare function toApolloError(result: ApolloQueryResult): ApolloError | undefined; interface UseWatchQueryOptionsHookOptions { client: ApolloClient; query: DocumentNode | TypedDocumentNode; options: SkipToken | SuspenseQueryHookOptions; } export declare function useWatchQueryOptions({ client, query, options, }: UseWatchQueryOptionsHookOptions): WatchQueryOptions; export {}; //# sourceMappingURL=useSuspenseQuery.d.ts.map