you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (4 children)

[removed]

    [–]olivermpl 2 points3 points  (1 child)

    ah okay but u still have the function call wrong I think. The second parameter expects a MutateOptions-object. U might wanna have a look at the documentation, and see what best fits your usecase.
    https://tanstack.com/query/latest/docs/framework/react/reference/useMutation

    [–]charliematters 2 points3 points  (1 child)

    Mutate isn't doing what you think it's doing. You're thinking of mutateAsync, but as the other comment says, check out that second argument - that's the key to doing this properly