UseInfiniteQuery not showing in query
Hi, im using trpc from theo template and want to create infinite scrolling but useInfiniteQuery is not showing. what am i doing wrong ?
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1215087826077614090/Screenshot_2024-03-07_at_01.04.51.png)
2 Replies
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1215087913696763914/Screenshot_2024-03-07_at_01.05.30.png)
trpc only allows for useInfiniteQuery usage if the query has an input object which has a cursor property, docs here. And in your case if you would like to preserve paginating based on the number of the page and limit, you could keep the cursor as a string type but encode the data as base64 when sending the request and parse it on the backend when responding. Lmk if that works for you.