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
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...