It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) passed by the graves in Madinah and said: "'Assalamu alaykum' (peace be upon you), O believing and Muslim people of the graves! We ask Allah's forgiveness for ourselves and for you. You have gone ahead of us, and we are following after you." And it is also narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both): The women said: O Messenger of Allah, why is it that Allah Almighty mentions the believing men but does not mention the believing women? So this verse was revealed: "Indeed, the Muslim men and Muslim women, and the believing men and believing women" [Al-Ahzab: 35].
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12560