@graphql-tools/executor
Version:
Fork of GraphQL.js' execute function
29 lines (28 loc) • 1.16 kB
TypeScript
import { Path } from '@graphql-tools/utils';
import { DeferUsage } from './collectFields.js';
import { PendingExecutionGroup, StreamRecord, SuccessfulExecutionGroup } from './types.js';
export type DeliveryGroup = DeferredFragmentRecord | StreamRecord;
/** @internal */
export declare class DeferredFragmentRecord {
path: Path | undefined;
label: string | undefined;
id?: string | undefined;
parentDeferUsage: DeferUsage | undefined;
pendingExecutionGroups: Set<PendingExecutionGroup>;
successfulExecutionGroups: Set<SuccessfulExecutionGroup>;
children: Set<DeliveryGroup>;
pending: boolean;
fns: Array<() => void>;
constructor(path: Path | undefined, label: string | undefined, parentDeferUsage: DeferUsage | undefined);
onPending(fn: () => void): void;
setAsPending(): void;
}
export declare function isDeferredFragmentRecord(deliveryGroup: DeliveryGroup): deliveryGroup is DeferredFragmentRecord;
/**
* @internal
*/
export declare class DeferredFragmentFactory {
private _rootDeferredFragments;
get(deferUsage: DeferUsage, path: Path | undefined): DeferredFragmentRecord;
private _pathAtDepth;
}