0👍
I got the same kind of error when trying this kind of situation. what helped removing this error was typeing the argument of the mutation function so in my example it was like this:
mutationFn: async (input) => {
return await fetch(props.apiPath, { method: "PUT", body: JSON.stringify(input) }).then((res) =>
res.json()
);
But when i updated it to this:
mutationFn: async (input) => {
return await fetch(props.apiPath, { method: "PUT", body: JSON.stringify(input) }).then((res) =>
res.json()
);
the error was gone & the function was running as expected. Hope this helps
- [Vuejs]-How to implement login with Axios for multiple types of users?
- [Vuejs]-Convert vuejs mixin to vue3 composition API
Source:stackexchange.com