Skip to content

Commit

Permalink
Fix query cache invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Oct 9, 2024
1 parent 8fc3179 commit 25aa929
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function CommodityForm<
await postSuccess?.(mutationEffectResponse, isEdit).catch((err) => {
sendErrorNotification(err.message);
});
queryClient.refetchQueries([groupResourceType]).catch(() => {
queryClient.invalidateQueries([groupResourceType]).catch(() => {
sendInfoNotification(t('Failed to refresh data, please refresh the page'));
});
goTo(successUrl);
Expand Down

0 comments on commit 25aa929

Please sign in to comment.