Thank you. This looks like a nice improvement on pgtyped, and another good option.
I'm curious if there are any good patterns for dealing with dynamic query building or composing queries?
I'm curious if there are any good patterns for dealing with dynamic query building or composing queries?
const { date, name, status } = args.filter;
await em.find(Employee, { date, name, employer: { status } });
Where the "shape" of the query is static, but `em.find` will drop/prune any filters/joins that are set to `undefined`.
So you get this nice "declarative / static structure" that gets "dynamically pruned to only what's applicable for the current query", instead of trying to jump through "how do I string together knex .orWhere clauses for this?" hoops.
For now, I type these manually, which is acceptable for my usage as they are pretty rare compared to static queries.