overrides: { useMutation: { async onSuccess(opts) { await opts.originalFn(); await opts.queryClient.invalidateQueries(); }, }, },
const utils = trpc.useContext();