import type { Command } from '../args.js'; import type { Profile } from '../profiles.js'; import { type Io } from '../output.js'; import { type VerbServerFactory } from './fetch.js'; /** * `fpx graphql [--var k=v]…` — run a DECLARED GraphQL operation * through the page's own Apollo client. * * Not a fetch. The extension resolves the declared `name` to an * `operationName`, finds the live DocumentNode the page's client already * observed, and invokes `client.query(...)` in the MAIN world — the same path * the site itself uses, so per-request bot telemetry runs automatically. That * is the whole reason the verb exists rather than being a POST you could hand * to `fpx post-json`. * * It follows that a name must be DECLARED: an undeclared one would be an * arbitrary query on the user's live session, which is a different privilege * from the ones already approved. Narrowed here, before the bridge is dialled, * and the server enforces it again. */ export declare function runGraphql(cmd: Extract, profile: Profile, io: Io, makeServer?: VerbServerFactory): Promise;