[SOLVED] AppwriteException: Invalid query: {"method":"limit","values":[15]}
- 1
- Databases
- Web
- Cloud

I upgraded my Next.js version to 14 and now I am getting this error when calling listDocuments on a collection. Any idea? hear is the code:
let response = await db.listDocuments(
process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID as string,
collections.posts,
[
Query.limit(limit),
Query.offset((page - 1) * limit),
Query.orderDesc('$createdAt'),
Query.isNull('parent')
]
);
return response.documents;
}```

check the value you're passing to the limit method and make sure it's a number

you might want to log it to the console before making any requests

it is a number, even if I comment out the limit it will throw that error with other Queries

the same code was working yestarday

Did you accidentally update appwrite or node-appwrite SDKs

Could you provide what versions youve got?

I have "appwrite": "^14.0.0"

You'll need to use appwrite 13.0.2, npm install appwrite@13.0.2
, if you look at the top of the packages page on NPM you'll see in bold letters, it says that is only valid for Appwrite 1.5.x.


Thank you

[SOLVED] AppwriteException: Invalid query: {"method":"limit","values":[15]}
Recommended threads
- I am trying to run appwrite storage list...
Hello! I am trying to use a command to return all of my files from my bucket. This is the cmd I am currently running: "appwrite storage list-files --bucket-id <...
- Appwrite messaging api error
```=== Push Notification Function Started === Endpoint: https://fra.cloud.appwrite.io/v1 Project: 6899062700398ffeae4f Database: threed-dating-db Notification f...
- ๐ Bug Report: Sign in with Apple/Google...
Environment: - Appwrite version: 1.8.0-RC2 (self-hosted) - Working version: 1.8.0 (Appwrite Cloud) - Platform: React Native - React Native version: 0.74.5 - re...
