UNPKG

1.24 kBTypeScriptView Raw
1import { WatchQueryOptions as CoreWatchQueryOptions, QueryOptions as CoreQueryOptions, MutationOptions as CoreMutationOptions, SubscriptionOptions as CoreSubscriptionOptions } from 'apollo-client';
2import { ExecutionResult } from 'graphql';
3export declare type R = {
4 [key: string]: any;
5};
6export interface ExtraSubscriptionOptions {
7 useZone?: boolean;
8}
9export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
10export interface WatchQueryOptionsAlone<V> extends Omit<WatchQueryOptions<V>, 'query' | 'variables'> {
11}
12export interface QueryOptionsAlone<V> extends Omit<CoreQueryOptions<V>, 'query' | 'variables'> {
13}
14export interface MutationOptionsAlone<T, V> extends Omit<CoreMutationOptions<T, V>, 'mutation' | 'variables'> {
15}
16export interface SubscriptionOptionsAlone<V> extends Omit<CoreSubscriptionOptions<V>, 'query' | 'variables'> {
17}
18export interface WatchQueryOptions<V> extends CoreWatchQueryOptions<V> {
19 /**
20 * Observable starts with `{ loading: true }`.
21 * There's a big chance the next major version will enable that by default.
22 *
23 * Disabled by default
24 */
25 useInitialLoading?: boolean;
26}
27export interface SubscriptionResult<T> extends ExecutionResult {
28 data?: T;
29}