Hello. I'm currently building this app which in the 'All' page where all the posts are displayed, I am implementing infinitequery. The error I'm getting is getNextPageParam accepting type error. The problem is because getNextPageParam() callback is expecting a number but Appwrite query method for infinite scrolling pagination Query.cursorAfter is accepting string as argument. I've tried everything, including chatGPt for help to no avail. Typescript is complaining this error obviously and its the only error in my app that's failing in production. It works on development however. Here is the link to the gist. Any help is greatly appreciated. it's very frustrating really... when i console.log(lastpage), lastPage is an object { total: number, documents: [{...}] } https://gist.github.com/joujou144/7a6358e447aa08d4a4bae221fa6b0212
What is pageParams supposed to be? Is that the id of a document? It sounds more like you confused the two types of pagination
cursorAfter requires the documentId aka the documentId where it should continue
Offset pagination uses integer to paginate
Recommended threads
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Streamlit UI and local DB
I want to use Appwrite for automation, like run watchdog service every morning 3 am. Anyone got suggestions, already explored github and documentation no luck. ...