Intercepting all Mongo Queries

Hey all,

I’m working on a new project that involves hooking into all queries made against all collections in a Meteor application.

I wrote up an article that spends a bit of time diving into the mongo Meteor package and goes into detail on one possible technique for intercepting all find, findOne, remove, update (etc…) calls made against any collection.

For the vast majority of problems, this is probably a far too heavy-handed solution, but hopefully it gives you a slightly better understanding of how Meteor and the Mongo driver work together!


I would have loved to have seen this last year when we made the switch to logical deletes on a project. Very cool!

1 Like