import type { GraphQLField } from 'graphql'; import { GqlOperation, type GqlRootKind } from './GqlOperation.js'; import type { ParseContextType } from '../../context/parseTypes.js'; import type { StackTrail } from '../../context/StackTrail.js'; export type ToRootFieldArgs = { rootKind: GqlRootKind; field: GraphQLField; context: ParseContextType; /** * Stack trail for the root field. Typical shape is `[, * ]` (e.g. `[Query, getUser]`); the function descends * into `args:` and `return` traces for child parses, so * `removeErroredItems` can prune individual args or the entire * operation depending on which target type errored. */ stackTrail: StackTrail; }; /** * Converts a single root-level GraphQL field into a {@link GqlOperation}. * * Used for each field on the Query / Mutation / Subscription root types. * Field arguments become {@link GqlArgument} instances; the return type * runs through {@link toFieldSchema} like any other field type. */ export declare const toRootField: ({ rootKind, field, context, stackTrail }: ToRootFieldArgs) => GqlOperation;