بسم الله الرحمن الرحيم
(Fatwa: 125/122/B=02/1436)
It is forbidden only when the graves are in front of the namazi. If there is a mosque and the wall of the mosque is a barrier in between then it is lawful to offer salah in the mosque of graveyard without any karahat.
Allah knows Best!
Darul Ifta,
Darul Uloom Deoband
