1 | import type { ExecutionResult } from 'graphql';
|
2 | import type { ApolloClientOptions, MutationOptions as CoreMutationOptions, QueryOptions as CoreQueryOptions, SubscriptionOptions as CoreSubscriptionOptions, WatchFragmentOptions as CoreWatchFragmentOptions, WatchQueryOptions as CoreWatchQueryOptions, FetchResult, OperationVariables, TypedDocumentNode } from '@apollo/client/core';
|
3 | export type EmptyObject = {
|
4 | [key: string]: any;
|
5 | };
|
6 | export type ResultOf<T extends TypedDocumentNode> = T extends TypedDocumentNode<infer R> ? R : never;
|
7 | export type VariablesOf<T extends TypedDocumentNode> = T extends TypedDocumentNode<any, infer V> ? V : never;
|
8 | export interface ExtraSubscriptionOptions {
|
9 | useZone?: boolean;
|
10 | }
|
11 | export type MutationResult<TData = any> = FetchResult<TData> & {
|
12 | loading?: boolean;
|
13 | };
|
14 | export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
15 | export interface WatchQueryOptionsAlone<TVariables extends OperationVariables = EmptyObject, TData = any> extends Omit<WatchQueryOptions<TVariables, TData>, 'query' | 'variables'> {
|
16 | }
|
17 | export interface QueryOptionsAlone<TVariables = EmptyObject, TData = any> extends Omit<CoreQueryOptions<TVariables, TData>, 'query' | 'variables'> {
|
18 | }
|
19 | export interface MutationOptionsAlone<TData = EmptyObject, TVariables = any> extends Omit<MutationOptions<TData, TVariables>, 'mutation' | 'variables'> {
|
20 | }
|
21 | export interface SubscriptionOptionsAlone<TVariables = EmptyObject, TData = any> extends Omit<CoreSubscriptionOptions<TVariables, TData>, 'query' | 'variables'> {
|
22 | }
|
23 | export interface WatchQueryOptions<TVariables extends OperationVariables = EmptyObject, TData = any> extends CoreWatchQueryOptions<TVariables, TData> {
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | useInitialLoading?: boolean;
|
31 | }
|
32 | export interface MutationOptions<TData = any, TVariables = EmptyObject> extends CoreMutationOptions<TData, TVariables> {
|
33 | |
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | useMutationLoading?: boolean;
|
40 | }
|
41 | export interface WatchFragmentOptions<TData = any, TVariables = EmptyObject> extends CoreWatchFragmentOptions<TData, TVariables> {
|
42 | }
|
43 | export interface SubscriptionResult<TData> extends ExecutionResult<TData> {
|
44 | }
|
45 | export type NamedOptions = Record<string, ApolloClientOptions<any>>;
|
46 | export type Flags = {
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | useInitialLoading?: boolean;
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 | useMutationLoading?: boolean;
|
60 | };
|