Skip to content

Commit

Permalink
only fetch most recent 100 players
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmacartney committed Oct 11, 2024
1 parent b08f197 commit a6c7584
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion convex/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ export const gameDescriptions = query({
const playerDescriptions = await ctx.db
.query('playerDescriptions')
.withIndex('worldId', (q) => q.eq('worldId', args.worldId))
.collect();
.order('desc')
.take(100);
const agentDescriptions = await ctx.db
.query('agentDescriptions')
.withIndex('worldId', (q) => q.eq('worldId', args.worldId))
Expand Down

0 comments on commit a6c7584

Please sign in to comment.