Creating and importing generator functions
Generator functions are units of TypeScript code used that generate a single field in your schema. This allows you to create reusable generation logic that can be used across your schema or in multiple projects.
To get started, navigate to the "Generator Functions" page.
This page is where you can create and edit generator functions.
[TODO - Show blank page]
Datalus instances are preloaded with default function templates that allow you to quickly get started in generating data. You can view these templates by clicking the "Explore Templates" button in the sidebar.
[TODO - Show explore templates button]
Click on a template to view a preview of the input/outputs and the code. To import a template into your generators, select the template and click the "Save Generator" button at the bottom.
[ TODO - show explore templates page]
Now you can view the generator function in the code editor. The code editor is divided into three panes.
[ TODO - show screenshot of page with code being viewed and annotated 1,2,3 for each pane]
- The generator function explorer
- The function editor
- The function info panel
Once you've imported some templates, you are now ready to create a project!
To learn more about writing generator functions, check out the Writing Generator Functions documentation