fix: resolve TypeScript build errors from leftJoin nullable types
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user