fix: resolve TypeScript build errors from leftJoin nullable types
Some checks failed
Build and Push Backend Image / build (push) Successful in 42s
Build and Push Frontend Image / build (push) Has been cancelled

Non-null assert photo/achievement ids that are structurally non-null
due to FK constraints but nullable in Drizzle's leftJoin return type.
Add missing description field to enrichVideo model select and map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 19:33:16 +01:00
parent a558449964
commit 90497e9e7c
4 changed files with 24 additions and 6 deletions

View File

@@ -102,7 +102,14 @@ builder.queryField("userGamification", (t) =>
return {
stats: stats[0] ? { ...stats[0], rank } : null,
achievements: userAchievements.map((a) => ({
...a,
id: a.id!,
code: a.code!,
name: a.name!,
description: a.description!,
icon: a.icon!,
category: a.category!,
required_count: a.required_count!,
progress: a.progress!,
date_unlocked: a.date_unlocked!,
})),
recent_points: recentPoints,