Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const createColumns = (
header: "",
},
{
accessorKey: "favourite",
cell: ({ row: { original } }) => (
<FavoriteDagButton dagId={original.dag_id} isFavorite={original.is_favorite} withText={false} />
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ export const useToggleFavoriteDag = (dagId: string) => {
queryKey: [useDagServiceGetDagsUiKey, UseDagServiceGetDagDetailsKeyFn({ dagId }, [{ dagId }])],
});

// Invalidate the specific DAG details query for this DAG
await queryClient.invalidateQueries({
queryKey: UseDagServiceGetDagDetailsKeyFn({ dagId }, [{ dagId }]),
});
const queryKeys = [
// Invalidate the specific DAG details query for this DAG and DAGs list query.
UseDagServiceGetDagDetailsKeyFn({ dagId }, [{ dagId }]),
[useDagServiceGetDagsUiKey],
];

await Promise.all(queryKeys.map((key) => queryClient.invalidateQueries({ queryKey: key })));
}, [queryClient, dagId]);

const favoriteMutation = useDagServiceFavoriteDag({
Expand Down