installing 11-40T Sunrace cassette with Sram Rival 22 I'm trying to build up a hillclimb bike (Mt. Washington) - current set-up is OK, but I could use the help AND don't care about temporarily losing the use of my big chain ring.  Current set-up (all SRAM Rival 22):


50/34 crankset
11-32 cassette
mid-length rear derailleur


Seems like the conversion should be possible with Sunrace CSMX8 cassette (11-40T, 11-speed), the Wolftooth derailleur hanger extension, and a SRAM PC-1130 chain.

Assuming this is possible, are there pitfalls to consider?  Other recommended parts?

RESULTS
For those of you who arrive in this rather obscure location wondering about a similar set-up, I made the change described above and disabled the front derailleur (per @Argenti Apparatus's suggestion) and it worked out beautifully - so far, shifts as well as or better than the standard set-up with the SRAM cassette...
SRAM Rival 22 mid-cage derailleurs work with 11-28 to 11-32 cassettes. Rival 22 cranks come in 52/36,  50/34 and 46/36 so I'm guessing the total capacity is 
(32-11) + (50-34) = 37.

If you will be running as pseudo 1x setup by not using the big ring, you will have plenty of capacity in the rear for a 11-40 cassette. Derailleur hanger extensions do apparently work but you may find you have some shifting issues.

Consider disabling the front derailleur, changing to the big ring by mistake could wreck the rear derailleur.