# queryClient.setQueryData type is not correct

**URL:** <https://forum.codewithmosh.com/t/queryclient-setquerydata-type-is-not-correct/27127>\
**Category:** React\
**Created:** [June 9, 2024, 7:16pm UTC](https://forum.codewithmosh.com/t/queryclient-setquerydata-type-is-not-correct/27127 "2024-06-09T19:16:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedrizvi](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@syedrizvi](https://forum.codewithmosh.com/u/syedrizvi)\
**Post date:** [June 9, 2024, 7:16pm UTC](https://forum.codewithmosh.com/t/queryclient-setquerydata-type-is-not-correct/27127/1 "2024-06-09T19:16:59Z")

</div>

Hello, I’m attempting to perform a setQueryData\<Todo\>([‘todos’], (todo) =\> …  
Update by watching the video. For some reason however my todo type is InfiniteData\<ToDo\> and it has a pages and pageParams props. I set my new todos to  
[savedToDo, …todos.pages] but it does not seem to work. Has anyone else ran into this issue where the type is and InfiniteData and not ToDo?
