import { type FieldNode, type DocumentNode as GraphQLDocument, type OperationDefinitionNode } from 'graphql'; /** * Find the operation definition in a parsed GraphQL document. A document may * lead with fragment definitions (e.g. `fragment ... query ...`), so the * operation is not necessarily `definitions[0]`. Returns `undefined` when the * document contains no operation definition at all. */ export declare function getOperationDefinition(document: GraphQLDocument): OperationDefinitionNode | undefined; /** * Collect the top-level field names selected by a mutation operation. Used to * route the operation onto the transactional or non-transactional mutation * path. A non-mutation operation yields no names. * * The operation text can come from any RPC client, so fragment spreads and * inline fragments at the mutation root are resolved rather than skipped: a * side-effecting field reachable only through `... on Mutation { ... }` or a * named fragment must still route onto the non-transactional path, otherwise * its network I/O runs inside the write transaction and a nested apply * deadlocks on single-connection SQLite. This runs before GraphQL validation, * so a missing or cyclic fragment must not throw or recurse forever. */ export declare function getRootMutationFields(document: GraphQLDocument): Array; export declare function getRootMutationFieldNames(document: GraphQLDocument): Array;