1 | import { DocumentNode } from 'graphql/language/ast';
|
2 | export declare type Variables = {
|
3 | [key: string]: any;
|
4 | };
|
5 | export interface GraphQLError {
|
6 | message: string;
|
7 | locations?: {
|
8 | line: number;
|
9 | column: number;
|
10 | }[];
|
11 | path?: string[];
|
12 | extensions?: any;
|
13 | }
|
14 | export interface GraphQLResponse<T = any> {
|
15 | data?: T;
|
16 | errors?: GraphQLError[];
|
17 | extensions?: any;
|
18 | status: number;
|
19 | [key: string]: any;
|
20 | }
|
21 | export interface GraphQLRequestContext<V = Variables> {
|
22 | query: string | string[];
|
23 | variables?: V;
|
24 | }
|
25 | export declare class ClientError extends Error {
|
26 | response: GraphQLResponse;
|
27 | request: GraphQLRequestContext;
|
28 | constructor(response: GraphQLResponse, request: GraphQLRequestContext);
|
29 | private static extractMessage;
|
30 | }
|
31 | export declare type RequestDocument = string | DocumentNode;
|
32 | export declare type BatchRequestDocument<V = Variables> = {
|
33 | document: RequestDocument;
|
34 | variables?: V;
|
35 | };
|