import type { GqlDocumentFields } from './GqlDocument.js'; import type { ParseContext, GqlParseOptions } from '../../context/ParseContext.js'; import type { StackTrail } from '../../context/StackTrail.js'; export type ParseGqlDocumentArgs = { options: GqlParseOptions; context: ParseContext; /** * Root stack trail to descend from. Each named type and root field * is parsed inside `stackTrail.trace(, ...)` so consumer * stack trails (recorded via `context.registerRef`) line up with * the addresses `removeErroredItems` uses to prune. */ stackTrail: StackTrail; }; /** * Internal implementation behind `ParseContext.parse()` (GQL branch) * and the convenience free function `toGqlDocument`. * * Returns the `GqlDocumentFields` ready to be assigned via * `gqlDocument.fields = ...` onto the empty `GqlDocument` that * `ParseContext` issued at construction time. This indirection exists * so refs constructed during the walk hold a reference to the same * `GqlDocument` instance that will eventually carry the fields — see * the forward-declared-refs notes on `OasDocument` / `GqlDocument`. * * Reads `context.schema` and `context.registry` directly — both are * populated by the `ParseContext` constructor, so this function does * no setup. */ export declare const parseGqlDocument: ({ options, context, stackTrail }: ParseGqlDocumentArgs) => { fields: GqlDocumentFields; };