fix(api): temp limit values with 100_000 (max call stack reached)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-11-25 14:35:11 +01:00
parent a06e0b54a6
commit 6bfeca5708

View File

@@ -160,6 +160,8 @@ export const chartRouter = createTRPCRouter({
}
sb.select.values = `distinct ${getSelectPropertyKey(property)} as values`;
sb.where.date = `${toDate('created_at', 'month')} > now() - INTERVAL 6 MONTH`;
sb.orderBy.created_at = 'created_at DESC';
sb.limit = 100_000;
const events = await chQuery<{ values: string[] }>(getSql());
values.push(