import type { GraphQlApiConfig, GraphQlApiResponse } from '../definitions/interfaces.js'; import type { FetchError } from './fetch-error.js'; import type { FetchResponse } from './fetch-response.js'; import { RestAPI } from './rest-api.js'; /** * The GraphQlAPI class extends the RestAPI class and manages the requests to a GraphQL API. * * - The base URL of the API is automatically concatenated to the path of the requests. * - The config of the API is automatically merged with the config of the requests. * - The status of the requests is automatically tracked and can be accessed through the status property. * - The requests are sent with the Fetch class, so all features of the Fetch class are available. * * [Aracna Reference](https://aracna.dariosechi.it/core/classes/graphql-api) */ export declare class GraphQlAPI extends RestAPI { /** * Sends a POST request to the GraphQL API. */ post(query: string, variables?: W, config?: T): Promise | FetchError>; /** * Sends a mutation to the GraphQL API. */ mutation(mutation: string, variables?: W, config?: T): Promise | FetchError>; /** * Sends a query to the GraphQL API. */ query(query: string, variables?: W, config?: T): Promise | FetchError>; }