Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pyroscope/src/utils/use-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function useLabelNames(datasource: DatasourceSelector): UseQueryResult<Se

return useQuery<SearchLabelNamesResponse, StatusError>({
enabled: !!client,
queryKey: ['searchLabelNames', client],
queryKey: ['searchLabelNames', start, end, client],
queryFn: async () => {
return await client!.searchLabelNames(
{},
Expand All @@ -56,7 +56,7 @@ export function useLabelValues(

return useQuery<SearchLabelValuesResponse, StatusError>({
enabled: !!client && labelName !== '', // do not trigger query if no labelName is set
queryKey: ['searchLabelValues', labelName, client],
queryKey: ['searchLabelValues', labelName, start, end, client],
queryFn: async () => {
return await client!.searchLabelValues(
{},
Expand All @@ -77,7 +77,7 @@ export function useProfileTypes(

return useQuery<SearchProfileTypesResponse, StatusError>({
enabled: !!client,
queryKey: ['searchProfileTypes', service, client],
queryKey: ['searchProfileTypes', service, start, end, client],
queryFn: async () => {
const profileTypesResponse = await client!.searchProfileTypes(
{},
Expand Down Expand Up @@ -117,7 +117,7 @@ export function useServices(datasource: DatasourceSelector): UseQueryResult<Sear

return useQuery<SearchLabelValuesResponse, StatusError>({
enabled: !!client,
queryKey: ['searchServices', client],
queryKey: ['searchServices', start, end, client],
queryFn: async () => {
return await client!.searchServices(
{},
Expand Down
Loading