UNPKG

@ace-fetch/graphql

Version:

Fetch Provider.

14 lines (13 loc) 633 B
import type { ApolloClient, TypedDocumentNode } from '@apollo/client'; import type { GraphQLFormattedError } from 'graphql'; import type { RegistGraphql } from '../types'; export declare class GraphQLInnerError extends Error { graphQLErrors: ReadonlyArray<GraphQLFormattedError>; constructor(message: string, graphQLErrors: ReadonlyArray<GraphQLFormattedError>); } /** * register graphql * @param client ApolloClient * @param definition regist graphqls definition */ export declare function registGraphql<C extends Record<string, TypedDocumentNode<any, any>>>(client: ApolloClient<any>, definition: C): RegistGraphql<C>;