graphql
Overview
Generates or refines GraphQL SDL with the help of an agent. The create subcommand accepts either an inline prompt or the contents of a file, while refine updates an existing schema using instructions stored in graphql.txt.
Usage
ouro graphql create <prompt-or-path?> <outPath> [--agent-model <model>]
ouro graphql refine <schemaPath> <outPath> [--agent-model <model>]
Key Options
--agent-model <model>– Override the model used for SDL generation or refinement.
Inputs & Outputs
- create inputs: literal prompt or file path plus optional system message from
src/consts/graphql.ts. - refine inputs: existing SDL file, instructions in
graphql.txt, and optional model override. - Outputs: GraphQL schema written to the specified path with trailing newline normalisation.
When to Use
- Draft a first-pass schema that matches requirements captured in
.ouro/requirements.md. - Iteratively refine existing SDL based on new constraints or reviewer feedback.
Follow-up Checklist
- Validate the generated SDL using your preferred schema tooling.
- Commit both the schema and
graphql.txtwhen the prompt changes.