From 7e3932ae5faefdb3ee5c213324634ca25cd16aeb Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Tue, 13 Jan 2026 10:48:57 -0600 Subject: [PATCH] feat(queries): add game results query keys for scoreboard Co-Authored-By: Claude Opus 4.5 --- apps/web/src/lib/queryKeys.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/web/src/lib/queryKeys.ts b/apps/web/src/lib/queryKeys.ts index 1d38717c..a924486e 100644 --- a/apps/web/src/lib/queryKeys.ts +++ b/apps/web/src/lib/queryKeys.ts @@ -59,6 +59,14 @@ export const entryPromptKeys = { pending: () => [...entryPromptKeys.all, 'pending'] as const, } +// Game results query keys (for scoreboard and history) +export const gameResultsKeys = { + all: ['game-results'] as const, + playerHistory: (playerId: string) => [...gameResultsKeys.all, 'player', playerId] as const, + classroomLeaderboard: (classroomId: string, gameName?: string) => + [...gameResultsKeys.all, 'leaderboard', 'classroom', classroomId, gameName] as const, +} + // Attachment query keys (for practice photos and worksheet parsing) export const attachmentKeys = { // All attachments for a player