Skip to content

Commit f2f9adc

Browse files
committed
feat(config): add comments for code-first and schema-first object loading methods
1 parent d4bbac0 commit f2f9adc

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

examples/app-crm/objectstack.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export default defineStack({
2222
},
2323

2424
// All objects in the app
25+
//
26+
// Method 1: Code-First (Explicit Import)
27+
// Directly import TypeScript object definitions. This provides strict type checking.
2528
objects: [
2629
Account,
2730
Contact,
@@ -30,6 +33,14 @@ export default defineStack({
3033
Case,
3134
Task
3235
],
36+
37+
// Method 2: Schema-First (Glob Patterns)
38+
// Alternatively, you can use glob patterns to load objects from the file system.
39+
// This is common for metadata-driven development or when using YAML/JSON files.
40+
// objects: [
41+
// './src/domains/**/*.object.ts',
42+
// './src/domains/**/*.object.yml'
43+
// ],
3344

3445
// Custom APIs
3546
apis: [

0 commit comments

Comments
 (0)