/** * Minimal GraphQL-over-HTTP client built on the global `fetch` (Node 18+). * * Replaces the `graphql-request` dependency. Only the surface this package * relied on is implemented: constructing with a url + headers, and a * `request(gql, variables)` method that resolves with the `data` payload or * rejects with a `ClientError` carrying `response.errors`. */ export type GraphQLError = { message: string; locations?: { line: number; column: number; }[]; path?: (string | number)[]; extensions?: Record; }; export type GraphQLResponse = { data?: T; errors?: GraphQLError[]; status: number; }; export type GraphQLClientOptions = { headers?: Record; credentials?: RequestCredentials; }; export declare class ClientError extends Error { response: GraphQLResponse; constructor(response: GraphQLResponse); } export declare class GraphQLClient { private url; private options; constructor(url: string, options?: GraphQLClientOptions); request(query: string, variables?: TVariables): Promise; }