await db.query.posts.findMany({
// assuming `posts` has an ID field:
where: (fields, ops) => ops.eq(fields.id, **SOME SORT OF SUBQUERY HERE**)
with: {
author: true,
},
});
await db.query.posts.findMany({
// assuming `posts` has an ID field:
where: (fields, ops) => ops.eq(fields.id, **SOME SORT OF SUBQUERY HERE**)
with: {
author: true,
},
});