If I understand The Abominable Bride correctly (admittedly a very big "if"), the graveyard scene serves to prove to Sherlock that
he's being ridiculous, of course Moriarty is dead, and whatever is happening now has been scheduled since long before his death.
However, if the Ricoletti case really had occurred, then the revelation of
"Ricolleti didn't come back from the dead. Moriarty didn't come back from the dead. People don't come back from the dead, period."
leaves that case unsolved. So, how were the Abominable Bride murders committed?