How to trigger a page refresh in the Admin UI after a Lifecycle Hook?

A little hacky, but it works for me:

import { useQueryClient } from "react-query";
...  
const queryClient = useQueryClient();
queryClient.invalidateQueries(["relation"]);

This code refreshing relations without reload page overall.

1 Like