You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
4.8 KiB
64 lines
4.8 KiB
import type { DocumentNode, OperationVariables, TypedDocumentNode } from "../../core/index.js"; |
|
import type { QueryReference } from "../internal/index.js"; |
|
import type { BackgroundQueryHookOptions, NoInfer } from "../types/types.js"; |
|
import type { FetchMoreFunction, RefetchFunction } from "./useSuspenseQuery.js"; |
|
import type { DeepPartial } from "../../utilities/index.js"; |
|
import type { SkipToken } from "./constants.js"; |
|
export type UseBackgroundQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = { |
|
fetchMore: FetchMoreFunction<TData, TVariables>; |
|
refetch: RefetchFunction<TData, TVariables>; |
|
}; |
|
type BackgroundQueryHookOptionsNoInfer<TData, TVariables extends OperationVariables> = BackgroundQueryHookOptions<NoInfer<TData>, NoInfer<TVariables>>; |
|
export declare function useBackgroundQuery<TData, TVariables extends OperationVariables, TOptions extends Omit<BackgroundQueryHookOptions<TData>, "variables">>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & TOptions): [ |
|
(QueryReference<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData, TVariables> | (TOptions["skip"] extends boolean ? undefined : never)), |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & { |
|
returnPartialData: true; |
|
errorPolicy: "ignore" | "all"; |
|
}): [ |
|
QueryReference<DeepPartial<TData> | undefined, TVariables>, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & { |
|
errorPolicy: "ignore" | "all"; |
|
}): [ |
|
QueryReference<TData | undefined, TVariables>, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & { |
|
skip: boolean; |
|
returnPartialData: true; |
|
}): [ |
|
QueryReference<DeepPartial<TData>, TVariables> | undefined, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & { |
|
returnPartialData: true; |
|
}): [ |
|
QueryReference<DeepPartial<TData>, TVariables>, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & { |
|
skip: boolean; |
|
}): [ |
|
QueryReference<TData, TVariables> | undefined, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: BackgroundQueryHookOptionsNoInfer<TData, TVariables>): [ |
|
QueryReference<TData, TVariables>, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken): [undefined, UseBackgroundQueryResult<TData, TVariables>]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (BackgroundQueryHookOptionsNoInfer<TData, TVariables> & { |
|
returnPartialData: true; |
|
})): [ |
|
QueryReference<DeepPartial<TData>, TVariables> | undefined, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: SkipToken | BackgroundQueryHookOptionsNoInfer<TData, TVariables>): [ |
|
QueryReference<TData, TVariables> | undefined, |
|
UseBackgroundQueryResult<TData, TVariables> |
|
]; |
|
export {}; |
|
//# sourceMappingURL=useBackgroundQuery.d.ts.map
|