Files
supabase/apps/studio/data/edge-functions/keys.ts
3f6cd1f188 error rates in functions list (#44006)
<img width="1835" height="886" alt="image"
src="https://github.com/user-attachments/assets/c4ab5be6-cddc-49b3-8d09-169acb706a20"
/>

Adds total request and error rate columns to edge functions table behind
a feature flag

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SaxonF <1072756+SaxonF@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-25 17:23:46 +08:00

19 lines
763 B
TypeScript

export const normalizeFunctionIds = (functionIds: string[]): string[] =>
Array.from(new Set(functionIds)).sort()
export const edgeFunctionsKeys = {
list: (projectRef: string | undefined) => ['projects', projectRef, 'edge-functions'] as const,
lastHourStats: (projectRef: string | undefined, functionIds: string[] = []) =>
[
'projects',
projectRef,
'edge-functions',
'last-hour-stats',
normalizeFunctionIds(functionIds),
] as const,
detail: (projectRef: string | undefined, slug: string | undefined) =>
['projects', projectRef, 'edge-function', slug, 'detail'] as const,
body: (projectRef: string | undefined, slug: string | undefined) =>
['projects', projectRef, 'edge-function', slug, 'body'] as const,
}