Skip to content

fix: fail typegen build when queries produce unknown result types#254

Merged
atilafassina merged 3 commits intomainfrom
fix/typegen-fail-on-unknown
Apr 8, 2026
Merged

fix: fail typegen build when queries produce unknown result types#254
atilafassina merged 3 commits intomainfrom
fix/typegen-fail-on-unknown

Conversation

@jamesbroadhead
Copy link
Copy Markdown
Contributor

Summary

  • When DESCRIBE QUERY fails, typegen silently generates result: unknown and reports success
  • This causes downstream TypeScript compilation errors that are confusing and hard to diagnose
  • Now generateFromEntryPoint checks for result: unknown schemas and throws a clear error listing the failed queries, so the build fails early

Test plan

  • Run appkit generate-types with a warehouse that rejects DESCRIBE QUERY
  • Verify the build fails with a clear error message listing the failed queries
  • Verify successful typegen still works normally

Fixes #244

This pull request was AI-assisted by Isaac.

When DESCRIBE QUERY fails, typegen silently generates `result: unknown`
and reports success, causing downstream TypeScript compilation errors.
Now typegen throws an error listing the failed queries, so the build
fails early with a clear message instead of producing unusable types.

Fixes #244
The error message now points users to the error codes printed above,
lists common causes, and suggests running the query directly in a SQL
editor against the specific warehouse to debug.
@atilafassina atilafassina merged commit f2d44ae into main Apr 8, 2026
9 of 15 checks passed
@atilafassina atilafassina deleted the fix/typegen-fail-on-unknown branch April 8, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typegen produces result: unknown when warehouse query fails

2 participants