grapheme-cli 0.4.1

Grapheme CLI for parsing, compiling, and running .gr workflows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import core from "grapheme/core"

query CoreValidateSchemaDemo {
  set { candidate: { name: "Ada", role: "Engineer" } }
  |> ValidateCandidate
}

iterator ValidateCandidate on Any {
  core.validate_schema(
    required: ["name", "role", "team"],
    data: $current.candidate
  )
  |> if $current.ok == true then transition $current.status -> valid else transition $current.status -> invalid { missing: $current.missing }
}