SRAM 11 speed Apex derailleur w/ SRAM GX 10-42t cassette I'm building up a drop bar bike and working with sram for the first time. 

The issue I've run into is that a local shop advised me that the indexing for the sram 11 speed road line and the mtb line was the same. So I've got a complete gx drivetrain (cassette, rear mech, crankset) hooked up to a sram s-500 bar-end shifter (which I have now been told is incompatible). 

It should also be noted that I have trp hylex brakes so brifters aren't the ideal solution in this case. 

I'm trying to salvage this build and it's been suggested that I just buy an apex rear derailleur and swap it out, but I'm concerned about it's compatibility with the 10-42t cassette (SRAM XG-1150 GX 11 SPEED). 

If I could go back and do it again I'd just buy the complete road group with brifters and use mechanical brakes, but I'd like to avoid re-selling what I've got if possible.
I think you have two options:


According to Zinn, you can use an Exact Actuation (not X-actuation) Rear Derailleur with the shifter, but I don't think there are any that take such a big cassette. So, you'd probably have to get a new cassette too. 
Use a JTEK Shiftmate 9. A Shiftmate is basically a pulley that you shove into the derailleur or shifter which adjusts the cable pull between two systems. The Shiftmate 9 takes a SRAM 11 speed road shifter and a SRAM 11 speed mountain derailleur and a Shimano/SRAM/Campagnolo cassette and makes them work together when you hook up the Shiftmate into the derailleur. Note that this is likely going to be a special order item made by a small company in the UK, and not cheap (looks to be ~41 USD on SJS Cycles; there are other retailers world wide, though).