1 | import type { DeepPartial } from "../../utilities/index.js";
|
2 | import type { Cache, Reference, StoreObject, MissingTree } from "../../cache/index.js";
|
3 | import type { ApolloClient, OperationVariables } from "../../core/index.js";
|
4 | import type { NoInfer } from "../types/types.js";
|
5 | export interface UseFragmentOptions<TData, TVars> extends Omit<Cache.DiffOptions<NoInfer<TData>, NoInfer<TVars>>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit<Cache.ReadFragmentOptions<TData, TVars>, "id" | "variables" | "returnPartialData"> {
|
6 | from: StoreObject | Reference | string;
|
7 | optimistic?: boolean;
|
8 | |
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | client?: ApolloClient<any>;
|
17 | }
|
18 | export type UseFragmentResult<TData> = {
|
19 | data: TData;
|
20 | complete: true;
|
21 | missing?: never;
|
22 | } | {
|
23 | data: DeepPartial<TData>;
|
24 | complete: false;
|
25 | missing?: MissingTree;
|
26 | };
|
27 | export declare function useFragment<TData = any, TVars = OperationVariables>(options: UseFragmentOptions<TData, TVars>): UseFragmentResult<TData>;
|
28 |
|
\ | No newline at end of file |