different `where` but same return type for relational queries?
what's the best way to approach it when i have a fair few relational queries that have different where: clauses, but are otherwise the same (or extremely similar)?
3 Replies
any ideas?
if there’s no good way to do this would you mind letting me know either way?
what do you want to approach exactly?
is there a part of my post that didn't make sense?
basically i have quite a few queries that return posts
but posts are some abstract object that are made up of other columns and relations
i.e., the
with
section
so the only difference between all these queries is what's inside the where
so essentially i'm wondering how i can avoid repeating exactly the same with
like 10 times
especially since it's rather long