How can TypeScript be informed that Variables
is the interface for the arguments of the myMutation
function?
interface Variables {
uuid: string;
value: string;
}
const { mutate: myMutation } = useMutation(myGqlMutation);
I am looking for an alternative to using myMutation
like this:
myMutation({
uuid: '....',
value: '....',
} as any); // eliminate the use of any here ...