bro

bro plan query

Cross-provider GraphQL fan-out β€” one plan, many connectors, one merged JSON answer.

A kind = "query" plan is a TOML list of independent GraphQL steps. bro plan run fans them out over connectors under a concurrency cap and prints one merged JSON document keyed by step id β€” declaration order, never completion order.

CommandWhat it does
bro plan query <plan.toml>Validate + run a query plan in one step β€” raw JSON on stdout, exit 1 when any step failed
bro plan run <plan.toml>The same plan through the generic runner (kind routes it)
bro plan validate <file>Check the plan without executing it

The contract

  • provider names a connector (the data plane: github, gitlab, atlassian, …) β€” never a providers entry; that registry is the model plane. Absent β†’ connectors.queries pin β†’ auto-detect.
  • Read-only. mutation/subscription documents are rejected at validate time.
  • No secrets in plans. env is a literal overlay β€” a token value written there is committed as text. Auth comes from the spawned CLI's own login (gh auth, glab auth, atlassian auth) or the operator's inherited environment; execution-shaping vars are rejected outright. Operators pin endpoints via the query.env config section instead.
  • vars are scalars (string/number/bool) for github/gitlab β€” serialized as -f k=v CLI fields. atlassian takes the table as the JSON variables body verbatim.
  • A failed step records { provider, error } (transport) or { provider, data?, errors? } (GraphQL response) and never aborts siblings. Any failure β†’ exit 1; results still print.
  • Output is raw β€” no item normalization.

On this page