# useMutation: No overload matches this call

**URL:** <https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344>\
**Category:** React\
**Created:** [May 19, 2023, 4:13pm UTC](https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344 "2023-05-19T16:13:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phinna](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Phinna](https://forum.codewithmosh.com/u/Phinna)\
**Post date:** [May 19, 2023, 4:13pm UTC](https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344/1 "2023-05-19T16:13:48Z")

</div>

Hi, I’m in the React: Intermediate class.

I got the below error message when I used useMuation(). Anyone knows how to fix it?

No overload matches this call.  
The last overload gave the following error.  
Argument of type ‘{ mutationFn: (data: Todo) =\> Promise; onMutate: (newTodo: Todo) =\> { previousTodos: Todo | undefined; }; onSuccess: (savedTodo: Todo, newTodo: Todo) =\> void; onError: (error: Error, newTodo: Todo, context: AddTodoContext) =\> void; }’ is not assignable to parameter of type ‘MutationKey’.  
Object literal may only specify known properties, and ‘mutationFn’ does not exist in type ‘readonly unknown’.ts(2769)

 ![Screen Shot 2023-05-19 at 9.11.33 AM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/e/e75bb81678111b83820a16114c467ba86d6aa568.png)

---

<div class="post-metadata">

**Author:** ![Doniyor](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@Doniyor](https://forum.codewithmosh.com/u/Doniyor)\
**Post date:** [June 8, 2023, 9:14am UTC](https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344/2 "2023-06-08T09:14:54Z")

</div>

Hi Phinna!  
I had a similar issue with useMutation and found in my code that I forgot to return a result from axios request in the post method of APIClient class:

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

---

<div class="post-metadata">

**Author:** ![hykhan94](https://avatars.discourse-cdn.com/v4/letter/h/e56c9b/32.png) [@hykhan94](https://forum.codewithmosh.com/u/hykhan94)\
**Post date:** [January 13, 2024, 7:34am UTC](https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344/3 "2024-01-13T07:34:22Z")

</div>

I am getting same error. I have re-confirmed regarding return statement at ‘apiClient.ts’. Would be pleased if anyone lends help to figure out this bug.

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

---

<div class="post-metadata">

**Author:** ![hykhan94](https://avatars.discourse-cdn.com/v4/letter/h/e56c9b/32.png) [@hykhan94](https://forum.codewithmosh.com/u/hykhan94)\
**Post date:** [January 13, 2024, 7:35am UTC](https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344/4 "2024-01-13T07:35:00Z")

</div>

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

---

<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, 11:49am UTC](https://forum.codewithmosh.com/t/usemutation-no-overload-matches-this-call/20344/5 "2024-07-15T11:49:25Z")

</div>

Hi , did u solve the problem? I face the exact one now and dont know how to solve it
