You'll probably want to buy a new hanger at the same time, if it snapped off, there's a good chance the hanger's bent - even if it looks straight.
The different models had different derailleurs, but easiest is to buy the same as you have - it will be compatible with your chain/cassette/shifter.
Time for a gearbox and belt drive!
Think I have a GX in a draw in the "cave" you could have , but it's winter and the humidity is high in there so I can't open them until spring (I tried the other day looking for something else). Check some of the Euro sites like alltricks. Or stick a wanted post up, there's probably a gazillion people with them on here sitting in a box they don't use.
The hanger is designed to break in sideways falls. You can't expect it to break or bend in every direction or people would be changing hangers on a daily basis (well, those that don't )It showed that the hanger was unaffected. In other words, it did not do its job, or alternatively the mech body was too lightweight, weak and feeble to do its job.
The World's largest electric mountain bike community.