Skip to main content
TypeORM entities can be automatically generated from the schema file defined in schema.graphql. The tool is called squid-typeorm-codegen(1) and has no additional options. Install with
Invoke with
The input can be schema.graphql or a schema/ directory containing multiple .graphql files. Models are written to src/model/generated as <entity>.model.ts files and import the column decorators they need from @subsquid/typeorm-store. Generated index names are deterministic and are shortened when needed to stay within PostgreSQL’s identifier limit.