diff --git a/apps/frontend/app/admin/problem/[problemId]/edit/_components/ScoreCautionDialog.tsx b/apps/frontend/app/admin/problem/[problemId]/edit/_components/ScoreCautionDialog.tsx index 85a883ff8..9550598ae 100644 --- a/apps/frontend/app/admin/problem/[problemId]/edit/_components/ScoreCautionDialog.tsx +++ b/apps/frontend/app/admin/problem/[problemId]/edit/_components/ScoreCautionDialog.tsx @@ -7,6 +7,7 @@ import { DialogHeader, DialogTitle } from '@/components/shadcn/dialog' +import { GET_BELONGED_CONTESTS } from '@/graphql/contest/queries' import { UPDATE_CONTEST_PROBLEMS_SCORES } from '@/graphql/problem/mutations' import { useMutation } from '@apollo/client' import { Suspense, useState } from 'react' @@ -29,7 +30,15 @@ export function ScoreCautionDialog({ problemId }: ScoreCautionDialogProps) { const [updateContestsProblemsScores] = useMutation( - UPDATE_CONTEST_PROBLEMS_SCORES + UPDATE_CONTEST_PROBLEMS_SCORES, + { + refetchQueries: [ + { + query: GET_BELONGED_CONTESTS, + variables: { problemId } + } + ] + } ) const [zeroSetContests, setZeroSetContests] = useState([])