On page 213 of the PHB for Antimagic Field:
Spells. Any active spell or other magical effect on a
creature or an object in the sphere is suppressed while
the creature or object is in it.
And on page 289 for Wish:
• You grant up to ten creatures you can see immunity to a single spell or other magical effect for 8 hours.
This creates a paradox where Antimagic Field shuts down the active spell effect of Wish while Wish makes the caster immune to the effects of Antimagic Field.
Would Wish come out on top due to it being 9th level while Antimagic Field is 8th level?
Best Answer
Specific Beats General
PHB 7 states,
In this case, the Wish specifically states that the target is immune to the Antimagic Field, whereas the text of Antimagic Field is more general. Thus, the Wish wins out.
Note that I think the wish only applies to the creature(s) it's cast on, though. You'd probably have to word the Wish quite carefully to allow casters to cast spells on other creatures inside the field, for example. Additionally, I wonder if such a wish would make that creature vulnerable to magic when they otherwise wouldn't be...
Careful Wordings
Note that any usage of wish besides the ones listed in the text gives the GM latitude to mess up your wish, and a sufficiently crafty DM could probably poke holes in nearly any wording. Depending on your particular situation, you could word your wish in several ways: