UNPKG

1.22 kBTypeScriptView Raw
1/// <reference types="zen-observable" />
2import { ApolloLink, Observable, Operation, NextLink, FetchResult } from 'apollo-link';
3import { ApolloCache } from 'apollo-cache';
4import { DocumentNode } from 'graphql';
5import { FragmentMatcher } from 'graphql-anywhere';
6export declare type ClientStateConfig = {
7 cache?: ApolloCache<any>;
8 resolvers: any | (() => any);
9 defaults?: any;
10 typeDefs?: string | string[] | DocumentNode | DocumentNode[];
11 fragmentMatcher?: FragmentMatcher;
12};
13export declare const withClientState: (clientStateConfig?: ClientStateConfig) => {
14 writeDefaults(): void;
15 request(operation: Operation, forward?: NextLink): Observable<FetchResult<Record<string, any>, Record<string, any>>>;
16 split(test: (op: Operation) => boolean, left: ApolloLink | ((operation: Operation, forward?: NextLink) => Observable<FetchResult<Record<string, any>, Record<string, any>>>), right?: ApolloLink | ((operation: Operation, forward?: NextLink) => Observable<FetchResult<Record<string, any>, Record<string, any>>>)): ApolloLink;
17 concat(next: ApolloLink | ((operation: Operation, forward?: NextLink) => Observable<FetchResult<Record<string, any>, Record<string, any>>>)): ApolloLink;
18};
19
\No newline at end of file