Model TypeDB data
August 6, 2026 ยท View on GitHub
Split-YAML is the schema and model-authoring authority. Generated Python, TypeScript/Node, and Rust packages project that authority into idiomatic value, entity, relation, reference, field-token, and role-token types.
Build a model
- Declare attribute types and scalar constraints.
- Declare entities, ownership, keys, and inheritance.
- Declare relations, roles, and allowed players.
- Express cardinality, uniqueness, ordering, and metadata.
- Use abstract types for polymorphic query boundaries.
- Run
type-bridge schema check, create/review a migration, then runtype-bridge schema generate.
Generated files are projections, not alternate schema authorities. Do not edit or subclass their package-internal bases. Change Split-YAML and regenerate.
Application values
Each generated attribute class wraps the target-language scalar for one schema attribute. Generated entity and relation constructors accept only the exact projected fields and role players declared by the workspace. Reference types carry an IID plus the key material needed by relation writes.
The generated packages deliberately differ at language boundaries: Python uses
keyword constructors, TypeScript uses create(...) and bigint for integer
values, and Rust separates create values from hydrated models. They preserve the
same labels, cardinalities, roles, keys, and query outcomes.