import { AmplifyClassV6 } from '@aws-amplify/core'; import { CustomHeaders } from '@aws-amplify/data-schema/runtime'; import { Observable } from 'rxjs'; import { GraphQLOptions, GraphQLResult } from './types'; import { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI'; export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => { query: any; variables: {}; authToken: string | undefined; }; /** * Export Cloud Logic APIs */ export declare class GraphQLAPIClass extends InternalGraphQLAPIClass { getModuleName(): string; /** * Executes a GraphQL operation * * @param options - GraphQL Options * @param [additionalHeaders] - headers to merge in after any `libraryConfigHeaders` set in the config * @returns An Observable if the query is a subscription query, else a promise of the graphql result. */ graphql(amplify: AmplifyClassV6 | (() => Promise), options: GraphQLOptions, additionalHeaders?: CustomHeaders): Observable> | Promise>; /** * Checks to see if an error thrown is from an api request cancellation * @param error - Any error * @returns A boolean indicating if the error was from an api request cancellation */ isCancelError(error: any): boolean; /** * Cancels an inflight request. Only applicable for graphql queries and mutations * @param {any} request - request to cancel * @returns A boolean indicating if the request was cancelled */ cancel(request: Promise, message?: string): boolean; } export declare const GraphQLAPI: GraphQLAPIClass;