It is haraam to build anything over graves
Building over graves is haraam and was forbidden by the Prophet (blessings and peace of Allah be upon him) because of what it involves of venerating the occupants of the graves and because it is a means that leads to worshipping these graves and taking them as gods besides Allah, as is the case with many of the buildings that were erected over graves; the people began to associate the occupants of these grave with Allah and to call upon them along with Allah, many He be exalted.
Praying to the occupants of the graves and seeking their help to relieve distress is major shirk and constitutes apostasy from Islam. And Allah is the One Whose help we seek. End quote.
Shaykh Muhammad ibn ‘Uthaymeen (may Allah have mercy on him)
Fataawa al-‘Aqeedah, p. 26
For more information see the answer to question number 83133.