import type { GraphQLFormattedError } from "graphql"; import type { DocumentNode } from "graphql"; import type { DefaultContext } from "../../core/index.js"; export type { DocumentNode }; import type { Observable } from "../../utilities/index.js"; export type Path = ReadonlyArray; interface ExecutionPatchResultBase { hasNext?: boolean; } export interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { data: TData | null | undefined; incremental?: never; errors?: ReadonlyArray; extensions?: TExtensions; } export interface IncrementalPayload { data: TData | null; label?: string; path: Path; errors?: ReadonlyArray; extensions?: TExtensions; } export interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { incremental?: IncrementalPayload[]; data?: never; errors?: never; extensions?: never; } export interface ApolloPayloadResult, TExtensions = Record> { payload: SingleExecutionResult | ExecutionPatchResult | null; errors?: ReadonlyArray; } export type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; export interface GraphQLRequest> { query: DocumentNode; variables?: TVariables; operationName?: string; context?: DefaultContext; extensions?: Record; } export interface Operation { query: DocumentNode; variables: Record; operationName: string; extensions: Record; setContext: { (context: Partial): void; (updateContext: (previousContext: DefaultContext) => Partial): void; }; getContext: () => DefaultContext; } export interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { data?: TData | null; context?: TContext; errors?: ReadonlyArray; extensions?: TExtensions; } export type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; export type NextLink = (operation: Operation) => Observable; export type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; //# sourceMappingURL=types.d.ts.map