# Problem with mutationfn in usemutation hook

**URL:** <https://forum.codewithmosh.com/t/problem-with-mutationfn-in-usemutation-hook/27681>\
**Category:** React\
**Created:** [July 15, 2024, 4:31pm UTC](https://forum.codewithmosh.com/t/problem-with-mutationfn-in-usemutation-hook/27681 "2024-07-15T16:31:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Razieh](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@Razieh](https://forum.codewithmosh.com/u/Razieh)\
**Post date:** [July 15, 2024, 4:31pm UTC](https://forum.codewithmosh.com/t/problem-with-mutationfn-in-usemutation-hook/27681/1 "2024-07-15T16:31:02Z")

</div>

I am in the middle of intermediate class and have problem with mutation process however I just follow the video step by step. I code from the beginning several times and every time I face this error.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/5/5cc06cc6bbad90c6a28468ca9cfcfa43cfb914f6.png)

_The Error:_  
No overload matches this call.  
The last overload gave the following error.  
Object literal may only specify known properties, and ‘mutationFn’ does not exist in type ‘readonly unknown’.ts(2769)  
useMutation.d.ts(6, 25): The last overload is declared here.  
(property) mutationFn?: MutationFunction\<unknown, void\> | undefined

Does anyone know how should I solve it?  
Thanks

---

<div class="post-metadata">

**Author:** ![Exolite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/exolite/32/7441_2.png) [@Exolite](https://forum.codewithmosh.com/u/Exolite)\
**Post date:** [July 24, 2024, 12:42am UTC](https://forum.codewithmosh.com/t/problem-with-mutationfn-in-usemutation-hook/27681/2 "2024-07-24T00:42:03Z")

</div>

> [@Razieh](#):
>
> useMutation.d.ts(6, 25): The last overload is declared here.

You probably need to add “return” at the start of line 10
