(Part No. 1; Page No. 418)
It is prohibited to perform Salah in a place where there is a grave. If one intends to become closer or receive the pleasure of a Waliy by performing Salah there, then doing so is Shirk Akbar (major form of associating others in worship with Allah). Allah (Exalted be He) says:
Say (O Muhammad صلى الله عليه وسلم): "Verily, my Salât (prayer), my sacrifice, my living, and my dying are for Allâh, the Lord of the ‘Alamîn (mankind, jinn and all that exists).
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.