@graphql-tools/delegate
Version:
A set of utils for faster development of GraphQL tools
28 lines (27 loc) • 1.34 kB
text/typescript
import { GraphQLResolveInfo, SelectionSetNode } from 'graphql';
import { Subschema } from './Subschema.cjs';
import { MergedTypeInfo } from './types.cjs';
export interface DelegationPlanInfo {
contextId?: string;
operationName?: string;
planId: string;
source?: string;
type?: string;
path: (string | number)[];
fieldNodes?: string[];
fragments: string[];
stages: {
stageId: string;
delegations: {
target?: string;
selectionSet: string;
}[];
}[];
}
export declare const delegationPlanIdMap: WeakMap<Map<Subschema<any, any, any, Record<string, any>>, SelectionSetNode>[], string>;
export declare const delegationStageIdMap: WeakMap<Map<Subschema<any, any, any, Record<string, any>>, SelectionSetNode>, string>;
export declare const logFnForContext: WeakMap<any, (data: any) => void>;
export declare const delegationPlanInfosByContext: WeakMap<any, Set<DelegationPlanInfo>>;
export declare const contextIdMap: WeakMap<any, string>;
export declare function isDelegationDebugging(): string | undefined;
export declare const getDelegationInfo: (context: any, delegationMaps: Map<Subschema<any, any, any, any>, SelectionSetNode>[], mergedTypeInfo: MergedTypeInfo, sourceSubschema: Subschema<any, any, any, any>, info: GraphQLResolveInfo) => DelegationPlanInfo;