Skip to content

Commit

Permalink
Fix missing time controls (#3023)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpgreen2 authored Sep 5, 2023
1 parent 746d346 commit faf546b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web-common/src/runtime-client/invalidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ export async function invalidateAllMetricsViews(
query.queryKey[0].startsWith(`/v1/instances/${instanceId}/catalog`),
});

// Second, remove queries for all metrics views. This will cause the active queries to refetch.
// Second, reset queries for all metrics views. This will cause the active queries to refetch.
// Note: This is a confusing hack. At time of writing, neither `queryClient.refetchQueries`
// nor `queryClient.invalidateQueries` were working as expected. Perhaps there's a race condition somewhere.
queryClient.removeQueries({
queryClient.resetQueries({
predicate: (query: Query) => {
return (
typeof query.queryKey[0] === "string" &&
Expand All @@ -151,8 +151,8 @@ export async function invalidateAllMetricsViews(
},
});

// Additionally, remove the queries for the rows viewer, which have custom query keys
queryClient.removeQueries({
// Additionally, reset the queries for the rows viewer, which have custom query keys
queryClient.resetQueries({
predicate: (query: Query) => {
return (
typeof query.queryKey[0] === "string" &&
Expand Down

1 comment on commit faf546b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.