@theguild/federation-composition
Version:
Open Source Composition library for Apollo Federation
36 lines • 1.34 kB
TypeScript
import { OperationTypeNode } from 'graphql';
import type { Logger } from '../../../../utils/logger.js';
import { type Edge } from './edge.js';
import { SatisfiabilityError } from './errors.js';
import type { Graph } from './graph.js';
import { type Lazy } from './helpers.js';
import type { MoveValidator } from './move-validator.js';
import { OperationPath, type Step } from './operation-path.js';
export declare class WalkTracker {
superPath: OperationPath;
paths: OperationPath[];
private errors;
constructor(superPath: OperationPath, paths: OperationPath[]);
move(edge: Edge): WalkTracker;
addPath(path: OperationPath): void;
addError(error: Lazy<SatisfiabilityError>): void;
isPossible(): boolean;
givesEmptyResult(): boolean;
isEdgeVisited(edge: Edge): boolean;
listErrors(): SatisfiabilityError[];
}
export declare class Walker {
private moveChecker;
private supergraph;
private mergedGraph;
private logger;
private pathFinder;
constructor(logger: Logger, moveChecker: MoveValidator, supergraph: Graph, mergedGraph: Graph);
walkTrail(operationType: OperationTypeNode, steps: Step[]): WalkTracker;
walk(method?: 'bfs' | 'dfs'): WalkTracker[];
private nextStep;
private dfs;
private _dfs;
private bfs;
}
//# sourceMappingURL=walker.d.ts.map