Skip to content

Commit 9072fbc

Browse files
keugenekclaude
andauthored
Emphasize typegen as required step after schema changes (#4291)
## Summary - Made Step 3 explicit: run typegen after any schema change - LLMs were adding query schemas but not running `npm run typegen`, causing TypeScript errors like "query key not assignable to type" ## Test plan - Documentation change only 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b2e18d8 commit 9072fbc

File tree

1 file changed

+12
-4
lines changed
  • experimental/aitools/templates/appkit/template/{{.project_name}}

1 file changed

+12
-4
lines changed

experimental/aitools/templates/appkit/template/{{.project_name}}/CLAUDE.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ export const querySchemas = {
3434
};
3535
```
3636

37-
**Step 3: Add visualization to your app**
37+
**Step 3: Run typegen (REQUIRED after any schema change)**
38+
39+
```bash
40+
npm run typegen
41+
```
42+
43+
This regenerates `client/src/appKitTypes.d.ts` with your new query types. **Without this step, TypeScript will not recognize your query keys and builds will fail.**
44+
45+
**Step 4: Add visualization to your app**
3846

3947
```typescript
4048
// client/src/App.tsx
@@ -45,9 +53,9 @@ import { BarChart } from '@databricks/appkit-ui/react';
4553

4654
**That's it!** The component handles data fetching, loading states, and rendering automatically.
4755

48-
**To refresh TypeScript types after adding queries:**
49-
- Run `npm run typegen` OR run `npm run dev` - both auto-generate type definitions in `client/src/appKitTypes.d.ts`
50-
- DO NOT manually edit `appKitTypes.d.ts`
56+
**⚠️ CRITICAL: Always run `npm run typegen` after modifying files in `config/queries/`**
57+
- DO NOT manually edit `client/src/appKitTypes.d.ts` - it is auto-generated
58+
- If you see errors like `'"my_query"' is not assignable to parameter of type`, run `npm run typegen`
5159

5260
## Installation
5361

0 commit comments

Comments
 (0)