Skip to main content

run

Function run 

Source
pub fn run(
    snapshot: &GraphSnapshot,
    symbol: &str,
    explain: bool,
    json: bool,
) -> Result<()>
Expand description

Runs the sqry graph resolve subcommand.

§Arguments

  • snapshot — immutable MVCC snapshot, already loaded by the caller.
  • symbol — raw symbol text from the CLI argument.
  • explain — when true, the ordered witness step trace is appended to the text output (or included as the explain field in JSON output).
  • json — when true, all output is emitted as a JSON document whose shape is the stable external contract documented in the module doc.

§Errors

Returns an error only when JSON serialization fails (an internal invariant violation — serde_json should never fail on our well-typed structs).