Back

Query Limitation to < 100 items

  • 0
  • Self Hosted
  • Flutter
  • Databases
KardoBMB
5 Nov, 2024, 17:02

I am building a Flutter Application using AppWrite as my main backend. I have it self-hosted using docker. Currently, I am on version 1.5.7 because this was available when I started. In my Application at some point, I want to do a query to fetch some content based on a list of IDs. I've attached a photo of the function. The reason I want to do this is because I want to fetch only the necessary "Posts" that are linked to the particular exercise ID. The issue that I am facing is that I get: AppwriteException: general_argument_invalid, Invalid queries param: Value must a valid array no longer than 100 items and Value must be a valid string and at least 1 chars and no longer than 4096 chars (400)). If I set the query limit to 33 so the full query does not exceed 100 items it works but this is not what I want. I thought the Query limit was 5000, not 100. If I try making a query with a limit of 5000 without any parameters, it works so this is kinda weird. My list contains only 3 ids. I've also tried hardcoding the IDs and I get the same error. Any idea why this is happening? Also, do you have any ideas if upgrading to 1.6.0 might help?

TL;DR
Developers are facing an issue with query limitations in Appwrite. The error occurs when passing more than 100 different queries in the request. Upgrading to version 1.6.0 might resolve this issue.
Kenny
5 Nov, 2024, 17:09

I don't believe this issue is with query.limit but that you're passing through more than 100 different queries in the request.

Kenny
5 Nov, 2024, 17:10

Like this

TypeScript
databases.listDocuments(
DATABASE_ID, 
COLLECTION_ID, [
Query.equal(),
Query.equal(),
...100 times
);
darShan
5 Nov, 2024, 17:12

update to latest, there was a bug iirc

KardoBMB
5 Nov, 2024, 17:12
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more