كتاب الجنائز
11  
The Book of Prayer - Funerals
(35)
Chapter: What is to be said when entering the graveyard and supplicating for its occupants
(35)
باب مَا يُقَالُ عِنْدَ دُخُولِ الْقُبُورِ وَالدُّعَاءِ لأَهْلِهَا ‏‏
Sahih Muslim 974 a

'A'isha reported (that whenever it was her turn for Allah's Messenger [may peace be upon him] to spend the night with her) he would go out towards the end of the night to al-Baqi' and say:

Peace be upon you, abode of a people who are believers. What you were promised would come to you tomorrow, you receiving it after some delay; and God willing we shall join you. O Allah, grant forgiveness to the inhabitants of Baqi' al-Gharqad. Qutaiba did not mention his words:" would come to you".
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى التَّمِيمِيُّ، وَيَحْيَى بْنُ أَيُّوبَ، وَقُتَيْبَةُ بْنُ سَعِيدٍ، قَالَ يَحْيَى بْنُ يَحْيَى أَخْبَرَنَا وَقَالَ الآخَرَانِ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ جَعْفَرٍ، عَنْ شَرِيكٍ، - وَهُوَ ابْنُ أَبِي نَمِرٍ - عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ عَائِشَةَ، أَنَّهَا قَالَتْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم - كُلَّمَا كَانَ لَيْلَتُهَا مِنْ رَسُولِ اللَّهِ صلى الله عليه وسلم - يَخْرُجُ مِنْ آخِرِ اللَّيْلِ إِلَى الْبَقِيعِ فَيَقُولُ ‏"‏ السَّلاَمُ عَلَيْكُمْ دَارَ قَوْمٍ مُؤْمِنِينَ وَأَتَاكُمْ مَا تُوعَدُونَ غَدًا مُؤَجَّلُونَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لاَحِقُونَ اللَّهُمَّ اغْفِرْ لأَهْلِ بَقِيعِ الْغَرْقَدِ ‏"‏ ‏.‏ وَلَمْ يُقِمْ قُتَيْبَةُ قَوْلَهُ ‏"‏ وَأَتَاكُمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 974a
In-book reference : Book 11, Hadith 131
USC-MSA web (English) reference : Book 4, Hadith 2126
  (deprecated numbering scheme)