import type { FieldOrigin, QueryTreeVariableOrigins } from '../database/database-adapter.js'; import type { FieldSelection } from '../graphql/query-distiller.js'; /** * Collects which GraphQL field each query tree variable has been created for * * Variables are identified by their index (VariableQueryNode.index). Because indices are assigned * in ascending order, the variables created while building the query node of a field form a * contiguous range. The ranges of nested fields are contained in the range of their parent field. */ export declare class VariableOriginRecorder implements QueryTreeVariableOrigins { private readonly originsByVariableIndex; /** * Records that the variables with indices in [startIndex, endIndex) have been created for the * innermost field of the given selection stack * * Indices that already have an origin keep it. Because a field is recorded after all its * child fields, this attributes each variable to the innermost field that created it. */ recordField(startIndex: number, endIndex: number, selectionStack: ReadonlyArray): void; getOrigin(variableIndex: number): FieldOrigin | undefined; }