In 2019, Mejía split the season between the Single-A Clinton LumberKings and the High-A Jupiter Hammerheads, going a combined 5–2 with a 2.09 ERA over 90+1⁄3 innings.
On August 31, 2020, Mejía, Caleb Smith, and Julio Frias were traded to the Arizona Diamondbacks in exchange for Starling Marte.
On the farm, Mejía made 21 starts split between the Triple-A Reno Aces and Double-A Amarillo Sod Poodles, posting a cumulative 7–9 record and 5.12 ERA with 100 strikeouts in 103.2 innings pitched.
[14] On July 14, Mejía threw the first complete-game shutout in club history, blanking the Piratas de Campeche while only allowing 3 hits in the 10–0 victory.
[17] In his team debut on August 4, Mejía tossed 5.0 quality innings in a 5–2 victory over the Generales de Durango.
[20] He was assigned to the Triple-A Syracuse Mets to begin the season,[21] where he made 8 starts and logged a 6.17 ERA with 30 strikeouts in 35.0 innings of work.