I would not go yo the graduation, would message the niece (I also call even my second cousin's daughter my niece and it seems totally natural to me, BTW) and apologize for not being able to attend the graduation and offer her to make up for that by inviting her to dinner, just she and you, to celebrate the occasion. If your finances allow it, you can also offer to take her shopping for a graduation present. The problem is not the niece, the problem is primarily mother and sister, so you want to avoid them and not her. There is no harm involved in spending quality one-on-one time with the niece. As for her, she would benefit much more from such quality time during which you can really focus on her as a unique and special being than she would if you simply formally attended her graduation.
When I suggested no contact with FOO, I meant all the problematic ppl such as mother and sister. I did not mean to break ties with the presumably innocent niece.