Perform PUT/PATCH request using mutation in vue-query #4729
-
|
I have the following code in my todo/edit.vue My With the above code setup I'm getting the following errors:
Refereeing to the line: And error message
Refereeing to line:
What would be the correct way to perform PUT/PATCH operation with "@tanstack/vue-query" ? Could somebody update the docs on this process ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
If you are using mutationFn: ({id, data}: {id: string, data: unknown}) => {
return update(id, data)
} |
Beta Was this translation helpful? Give feedback.

If you are using
typescript, you should provide types for themutationFnparameters.Example: