@tokens-studio/sdk
Version:
The official SDK for Tokens Studio
36 lines • 1.09 kB
TypeScript
import { ApolloClient } from '@apollo/client/core/index.js';
export type RequestCookies = {
name: string;
value: string;
};
export type Fetch = typeof fetch;
/**
* Creates an instance of the SDK Client
*
* The webSocketImpl parameter is used to inject a custom WebSocket implementation. This is useful for testing purposes, and handling isomorphic environments.
* @returns
*/
export declare function create({ auth, host, secure, fetch, cookies, webSocketImpl, }: {
/**
* A custom fetch implementation. Defaults to the global fetch.
*/
fetch?: Fetch;
webSocketImpl?: unknown;
/**
* The host address without the protocol. Defaults to graphql.app.tokens.studio
*/
host?: string;
/**
* The API Key to use for authentication. Not needed if using cookies.
*/
auth?: string;
/**
* Optionally pass in an explicit jwt cookie
*/
cookies?: RequestCookies[];
/**
* Whether to use a secure connection. Defaults to true.
*/
secure?: boolean;
}): ApolloClient<any>;
//# sourceMappingURL=graphql.d.ts.map