import type { ExecutionResult } from 'graphql'; import type { ApolloClientOptions, MutationOptions as CoreMutationOptions, QueryOptions as CoreQueryOptions, SubscriptionOptions as CoreSubscriptionOptions, WatchQueryOptions as CoreWatchQueryOptions, FetchResult, OperationVariables, TypedDocumentNode } from '@apollo/client/core'; export type EmptyObject = { [key: string]: any; }; export type ResultOf = T extends TypedDocumentNode ? R : never; export type VariablesOf = T extends TypedDocumentNode ? V : never; export interface ExtraSubscriptionOptions { useZone?: boolean; } export type MutationResult = FetchResult & { loading?: boolean; }; export type Omit = Pick>; export interface WatchQueryOptionsAlone extends Omit, 'query' | 'variables'> { } export interface QueryOptionsAlone extends Omit, 'query' | 'variables'> { } export interface MutationOptionsAlone extends Omit, 'mutation' | 'variables'> { } export interface SubscriptionOptionsAlone extends Omit, 'query' | 'variables'> { } export interface WatchQueryOptions extends CoreWatchQueryOptions { /** * Observable starts with `{ loading: true }`. * There's a big chance the next major version will enable that by default. * * Disabled by default */ useInitialLoading?: boolean; } export interface MutationOptions extends CoreMutationOptions { /** * Observable starts with `{ loading: true }`. * There's a big chance the next major version will enable that by default. * * Disabled by default */ useMutationLoading?: boolean; } export interface SubscriptionResult extends ExecutionResult { } export type NamedOptions = Record>; export type Flags = { /** * Observable starts with `{ loading: true }`. * There's a big chance the next major version will enable that by default. * * Disabled by default */ useInitialLoading?: boolean; /** * Observable starts with `{ loading: true }`. * * Disabled by default */ useMutationLoading?: boolean; };