import type { HttpDriverInstance, ResponseFormat } from "../types/driver"; /** * GraphQL request payload shape. */ export interface GraphQLRequest { query: string; variables?: Record; operationName?: string; } /** * GraphQL response data shape. */ export interface GraphQLResponse { data: T | null; errors?: Array<{ message: string; locations?: Array<{ line: number; column: number; }>; path?: Array; extensions?: Record; }>; } /** * Creates a GraphQL executor bound to a specific service ID. * Uses the driver's execService or execServiceByFetch under the hood. * * Usage: * const gql = createGraphQLClient(driver, "graphql"); * const result = await gql.query(`query { user(id: 1) { name } }`); * const result = await gql.mutation(`mutation { createUser(name: "John") { id } }`); */ export declare function createGraphQLClient(driver: HttpDriverInstance, serviceId: string, options?: { useFetch?: boolean; }): { execute: (request: GraphQLRequest, requestOptions?: Record) => Promise>>; query: (query: string, variables?: Record, requestOptions?: Record) => Promise>>; mutation: (query: string, variables?: Record, requestOptions?: Record) => Promise>>; };