Back

Queries

  • 0
  • Databases
  • Flutter
  • Cloud
Dritz
4 Jan, 2024, 21:31

Is there a limit to how many queries I can have in one request.

Assume a user has 100 people blocked, I want to fetch a list of documents that excludes blocked users

How should I make this request?

TL;DR
The user wants to know the correct way to fetch a list of documents that excludes documents made by blocked users. They provided a code snippet with a list of blocked user_ids. The user mentioned that there is a limit of 100 queries per request and wonders if there is a limit to the number of queries in one request. Finally, the user asks for guidance on how to make this request. Solution: To fetch a list of documents that excludes blocked users, you can use the provided code snippet. However, since there is a limit of 100 queries per request, you need to handle cases where a user has more than 100
ideclon
4 Jan, 2024, 21:33

There’s a limit of 100 Queries per request

Dritz
5 Jan, 2024, 01:40

Thanks. I’m wondering if this is the correct way to fetch a list of documents that excludes documents made by blocked users

TypeScript

// An array with 200 user ids
List<String> blockList  = ["User1", "User2", ... "User200"];

var yourDocuments = await _database.listDocuments(
          databaseId: '...',
          collectionId: '...',
          queries: [
            Query.notEqual("userid", blockList)
          ]);
ideclon
5 Jan, 2024, 01:50

That looks right to me

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