node_modules.graphql-request.dist.src.index.d.ts Maven / Gradle / Ivy
import { GraphQLError, Headers as HttpHeaders, Options, Variables } from './types';
export { ClientError } from './types';
import 'cross-fetch/polyfill';
export declare class GraphQLClient {
private url;
private options;
constructor(url: string, options?: Options);
rawRequest(query: string, variables?: Variables): Promise<{
data?: T;
extensions?: any;
headers: Headers;
status: number;
errors?: GraphQLError[];
}>;
request(query: string, variables?: Variables): Promise;
setHeaders(headers: HttpHeaders): GraphQLClient;
setHeader(key: string, value: string): GraphQLClient;
}
export declare function rawRequest(url: string, query: string, variables?: Variables): Promise<{
data?: T;
extensions?: any;
headers: Headers;
status: number;
errors?: GraphQLError[];
}>;
export declare function request(url: string, query: string, variables?: Variables): Promise;
export default request;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy