Filtering with Queries or with TS?
In this case the _id of the document is provided but additional checks need to be done.
Is it using regular and then doing the filtering in TypeScript
Or
Is it creating a index on the to be filtered table and then doing the filtering with and with a falsy check?
My thoughts:
Using the TypeScript approach gives the developer more fine grained control on handling the exact error case and adding logging and meaningful responses to the client. It does add boilerplate though.
Using the query approach seems to be easier when it comes to adding new constraints to a request and it seems to have less boilerplate.
I would like your thoughts on this and on how you handle these cases.
