Files
Joshen Lim 2808931f92 Chore/refactor unified logs infinite queries (#36598)
* Split unified logs count into its own infinite query and refactor main UI to use that new query

* Split unified logs into its own infinite query and refactor main UI to use that new query

* Shift useChartData into unified-logs-chart-query, and refactor main UI to use that new query

* Rename unified-logs-query to unified-logs-infinite-query

* Remove uuid and live params from query string in react queries for unified logs
2025-06-24 16:28:00 +08:00

38 lines
963 B
TypeScript

import { QuerySearchParamsType } from 'components/interfaces/UnifiedLogs/UnifiedLogs.types'
export const logsKeys = {
unifiedLogsInfinite: (
projectRef: string | undefined,
searchParams: QuerySearchParamsType | undefined
) =>
[
'projects',
projectRef,
'unified-logs',
'logs-data',
...(searchParams ? [searchParams].filter(Boolean) : []),
] as const,
unifiedLogsCount: (
projectRef: string | undefined,
searchParams: QuerySearchParamsType | undefined
) =>
[
'projects',
projectRef,
'unified-logs',
'count-data',
...(searchParams ? [searchParams].filter(Boolean) : []),
] as const,
unifiedLogsChart: (
projectRef: string | undefined,
searchParams: QuerySearchParamsType | undefined
) =>
[
'projects',
projectRef,
'unified-logs',
'chart-data',
...(searchParams ? [searchParams].filter(Boolean) : []),
] as const,
}