I want to add a where() clause in my query, but conditionally. Specifically, I want it added only if a sepecific querystring parameter is passe
where()
You can actually use query builder inside .where() like so:
.where((qb) => {condition == true ? do something if true : do something if false })
IMO @ItaiNoam answer should be correct with .modify()
.modify()