Break schema into multiple files

Can you break the schemas into multiple files? So for example a schema folder that exports the schema's defined in an index file? I figure I can probably accomplish something similar with a schemas folder that imports schemas into the schema.ts file.
2 Replies
ian
ian2y ago
Yeah you can import into schema.ts from other files. I have organized it a few ways over time. I’ll have a public repo soon that keeps them all in a separate file that also has a helper for defining argument validation types based on tables Later this week I suspect It all has to end up in defineSchema in schema.ts though
Chad Maycumber
Chad MaycumberOP2y ago
Nice looking forward to seeing that I just made the move myself

Did you find this page helpful?