Module generate

Source
Expand description

entity-graph generate โ€” reads a schema JSON file (SDL IR) and emits TypeScript entity type definitions + a transport-registration stub.

Structsยง

EntityCtx ๐Ÿ”’
Per-entity data passed into Tera templates.
FieldCtx ๐Ÿ”’
Per-field data passed into Tera templates.
GenerateArgs
Arguments for the generate subcommand (parsed by clap in main).
RelationCtx ๐Ÿ”’
Per-relation data passed into Tera templates.

Enumsยง

Target
Code-generation targets.

Functionsยง

build_entity_ctx ๐Ÿ”’
build_tera_ctx ๐Ÿ”’
Build the shared Tera context for all templates.
generate_react ๐Ÿ”’
render ๐Ÿ”’
Render a Tera template string and return the output.
run
Execute the generate subcommand.