Spoken to a whole cemetery at once
He addressed them as people of a dwelling, not as the dead.
السَّلاَمُ عَلَيْكُمْ دَارَ قَوْمٍ مُؤْمِنِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لاَحِقُونَ
As-salāmu ʿalaykum dāra qawmin mu'minīn, wa innā in shā' Allāhu bikum lāḥiqūn.
“Peace be upon you, dwelling of a believing people. And we will, if Allah wills, be joining you.”
The full narration
Abu Huraira reported:The Messenger of Allah (may peace The upon him) went out to the graveyard and said: Peace be upon you, the abode of the believing people. and If Allah so wills we shall join you.... (and so on and so forth) like the hadith narrated by Isma'il b. Ja'far except the words of Malik: Then some persons would be driven away from my Cistern
Source
Ṣaḥīḥ Muslim · 585
Ṣaḥīḥ
- Agreed upon as authentic (al-Bukhārī / Muslim)