import type { DocumentNode, FormattedExecutionResult, GraphQLFormattedError } from "graphql"; import type { ApolloLink } from "@apollo/client/link"; import type { DeepPartial, HKT } from "@apollo/client/utilities"; import type { Incremental } from "../types.js"; export declare namespace GraphQL17Alpha9Handler { interface GraphQL17Alpha9Result extends HKT { arg1: unknown; arg2: unknown; return: GraphQL17Alpha9Handler.Chunk>; } interface TypeOverrides { AdditionalApolloLinkResultTypes: GraphQL17Alpha9Result; } type InitialResult> = { data: TData; errors?: ReadonlyArray; pending: ReadonlyArray; hasNext: boolean; extensions?: Record; }; type SubsequentResult = { hasNext: boolean; pending?: ReadonlyArray; incremental?: ReadonlyArray>; completed?: ReadonlyArray; extensions?: Record; }; interface PendingResult { id: string; path: Incremental.Path; label?: string; } interface CompletedResult { id: string; errors?: ReadonlyArray; } interface IncrementalDeferResult> { errors?: ReadonlyArray; data: TData; id: string; subPath?: Incremental.Path; extensions?: Record; } interface IncrementalStreamResult> { errors?: ReadonlyArray; items: TData; id: string; subPath?: Incremental.Path; extensions?: Record; } type IncrementalResult = IncrementalDeferResult | IncrementalStreamResult; type Chunk = InitialResult | SubsequentResult; } declare class IncrementalRequest implements Incremental.IncrementalRequest, TData> { hasNext: boolean; private data; private errors; private extensions; private pending; private streamInfo; private streamPositions; handle(cacheData: TData | DeepPartial | null | undefined, chunk: GraphQL17Alpha9Handler.Chunk): FormattedExecutionResult; private merge; } /** * Provides handling for the incremental delivery specification implemented by * graphql.js version `17.0.0-alpha.9`. */ export declare class GraphQL17Alpha9Handler implements Incremental.Handler> { /** * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ isIncrementalResult(result: ApolloLink.Result): result is GraphQL17Alpha9Handler.InitialResult | GraphQL17Alpha9Handler.SubsequentResult; /** * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ prepareRequest(request: ApolloLink.Request): ApolloLink.Request; /** * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ extractErrors(result: ApolloLink.Result): GraphQLFormattedError[] | undefined; /** * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ startRequest(_: { query: DocumentNode; }): IncrementalRequest; } export {}; //# sourceMappingURL=graphql17Alpha9.d.ts.map