kikstart-graphql-client
Version:
Small NodeJS Wrapper around apollo-client that provides easy access to running queries, mutations and subscriptions.
20 lines (19 loc) • 789 B
TypeScript
import { ApolloClient } from 'apollo-client';
export interface KikstartGraphQLLinkConfig {
mutationLink?: 'http' | 'ws';
queryLink?: 'http' | 'ws';
subscriptionLink?: 'ws';
}
export interface KikstartGraphQLClientConfig extends KikstartGraphQLLinkConfig {
url: string;
wsUrl?: string;
wsOptions?: any;
cache?: any;
headers?: any;
connectionParams?: any;
log?: any;
uri?: string;
wsUri?: string;
}
export declare const createLink: (httpLink: any, wsLink: any, { mutationLink, queryLink, subscriptionLink }: KikstartGraphQLLinkConfig) => any;
export declare const createClient: (httpLink: any, wsLink: any, { url, wsUrl, mutationLink, queryLink, subscriptionLink, cache, headers, log, }: KikstartGraphQLClientConfig) => ApolloClient<unknown>;