Back

Query not valid: Invalid limit: Value must be a valid range between 0 and 100 (400)

  • 0
  • Databases
  • Flutter
  • Cloud
conqueror
28 May, 2023, 13:03

AppwriteException: general_argument_invalid, Query not valid: Invalid limit: Value must be a valid range between 0 and 100 (400) i want to call more then 5k data in single response how to achieve this in appwrite cloud if there is limit

TL;DR
The user is experiencing an error message stating "Query not valid: Invalid limit: Value must be a valid range between 0 and 100 (400)". They are asking if using a function or pagination would be a good option to fetch all the data in a single response. The user also asks if backup is possible in the cloud version. The suggested solution is to paginate the data to avoid loading too much data into memory. It is mentioned that the limit can be removed in the self-hosted version, but not in the cloud version. The user also mentions facing the same problem and asks for code snippet assistance. There is no specified solution
conqueror
28 May, 2023, 13:21

is anyone is here ?

firestorm
28 May, 2023, 13:24

can you send the code snippet once ?

firestorm
28 May, 2023, 13:25

because AppwriteException: general_argument_invalid, Query not valid: Invalid limit: Value must be a valid range between 0 and 100 (400) returns the same even if the args are wrong sometimes

firestorm
28 May, 2023, 13:25

or atleast i have faced the same problem

safwan
28 May, 2023, 13:26

The limits can be removed if you're on self-hosted (i think). For the cloud version, I don't think you can get rid of/change the limit

firestorm
28 May, 2023, 13:28

nah nah i have got like between 1 and 200 and kinda worked

firestorm
28 May, 2023, 13:28

lemme verify once

conqueror
28 May, 2023, 13:29

is backup is possible in cloud version ?

safwan
28 May, 2023, 13:31

not right now.

safwan
28 May, 2023, 13:32

might be supported in the future, not a 100% certain.

conqueror
28 May, 2023, 13:32

ok,

conqueror
28 May, 2023, 13:33

is there is anyway to get all 5k data in single response

conqueror
28 May, 2023, 13:46

is using function will be good option?

conqueror
28 May, 2023, 13:47

but it will be costly for appwrite 😅

Drake
28 May, 2023, 16:30

Not on cloud since we removed the max limit in 1.3 and cloud is 1.1.2.

That said, you typically don't want to fetch too many things at once because that loads too much data into memory. That's why it's best to paginate

conqueror
28 May, 2023, 16:32

ok

conqueror
29 May, 2023, 09:28

but what if i want to fetch all data in single response, do i have to use function for this.

Drake
29 May, 2023, 14:40

Appwrite function is unrelated and probably won't help because the maximum response from an Appwrite function is 4MB or something

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