Filter on relations based upon a WITH

I'd like to filter based upon a table that's in the with clause.
db.query.myTable.findMany({
  where: inArray(otherTable.id, [1,2]),
  with: {
    otherTable: true,
  }
})
Was this page helpful?