Sauté mushrooms and onions until tender, about five minutes; remove from skillet and set aside. Spread mayonnaise on the bread slices.
Turn the slices mayo-side-down and evenly spread hummus on all four slices.
On only two of those slices, evenly layer mushroom-onion mixture followed by cheese.
Top with remaining two bread slices with mayonnaise-side-up. Each of the two sandwiches will have hummus on the top and bottom, with cheese and mushroom mixture in the centre.
Reheat the skillet over medium heat; place sandwiches mayonnaise-side-down in the skillet, and cook until golden brown on both sides and cheese is melted, five to six minutes, flipping half-way through.