If I understand your question, you want to apply pre-filtering directly on the query ?
If it is what you want, I recommand you to check this documentation, you can addd filters to the query to be able to avoid useless data transfer.
You can combine it with the Populate options, that allow you to select what fields to develop, or not sending etc…
If that is not what you want, I am sorry I didn’t understood your question