How are you supposed to get triple-nested where queries to work?

db.query.users.findMany({
  where: undefined,
  with: {
    orders: {
      where: undefined,
      with: {
        orderItems: {
          where: undefined,
          with: {
            details: {
              where: undefined,
              ^^^^^^^^^^^^^^^^  WHERE IS NOT A VALID KEY
              with: {}
            }
          }
        }
      }
    }
  }
});
Was this page helpful?