voltrb

limit the results of a query server side


I would like to know how to limit a query (server side. My knowledge is Meteor). For example, the comments of a particular post instead of retrieving all the comments in database.

I want it to be limited server side to avoid malicious client to fetch all the data of the database.

Thanks.


Solution

  • I think we talked about this in gitter, but I'm planning to add a query_restrictions api where you can reject queries that you don't like. I'll probably add a default globally configurable limit also. (that you can override on a per model basis)