Skip to content

Perform PUT/PATCH request using mutation in vue-query #4729

Answered by DamianOsipiuk
bantawa04 asked this question in Q&A
Discussion options

You must be logged in to vote

If you are using typescript, you should provide types for the mutationFn parameters.
Example:

mutationFn: ({id, data}: {id: string, data: unknown}) => {
  return update(id, data)
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@QNam
Comment options

@DamianOsipiuk
Comment options

Answer selected by DamianOsipiuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants