mutation options

is there a way to use mutations like the queryOptions api?
so something like:
const addTodoMutation = mutationOptions({
mutationKey: ["todo", "add"],
mutationFn: () => {}
})

const { mutate } = useMutation(addTodoMutation)
Was this page helpful?