Grafdigger's Cage states that creature cards in graveyards and libraries can't enter the battlefield. This is a replacement effect that stops the entry itself — it does not make graveyard creatures illegal targets for spells like Reanimate or Animate Dead.
Under CR 608.2b, if a spell's effect becomes impossible to execute (the creature can't enter the battlefield), that part of the effect simply fails to happen. The spell still resolves, it still targets legally, and it still uses the mana you spent — it just doesn't produce the creature on the battlefield.
The targeting rules (CR 601.2c) require only that a target be a legal target at the time of casting. A creature card sitting in a graveyard is a perfectly legal target for a reanimation spell even if Grafdigger's Cage is in play, because the Cage imposes no restriction on targeting — only on entering the battlefield.
Concrete example: Your opponent casts Reanimate targeting Emrakul in your graveyard while Grafdigger's Cage is on the battlefield. Reanimate resolves normally, your opponent loses life equal to Emrakul's mana value, but Emrakul stays in the graveyard because the Cage's replacement effect prevents it from entering the battlefield.
Note: If a reanimation effect says 'return target creature card from a graveyard to the battlefield,' the spell resolves but the return-to-battlefield action is simply stopped by the Cage (CR 614.6). The card remains in the graveyard.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.