Caramelize the onions. In a thick bottomed pan, set to medium low. Melt about 2 tablespoons of olive oil or 50:50 olive oil and butter. When oil is shimmering add the sliced onions and sprinkle with salt. Let roast up to 1 hour, stirring occasionally and tasting for salt. When my onions start sticking a bit, I usually add a pat of butter and stir. Once fully cooked down and brown, remove from heat and set aside.
On each slice of bread, add about a teaspoon of Dijon mustard (or to taste).
In a clean pan, melt about 1 tbsp of butter. Place one slice of bread in pan, Dijon side up. Top with ½ cup of cheese, then the apple slices, then about 2 tbsp of caramelized onion mixture, then ½ cup of cheese, then another slice of bread Dijon side down. Cover the pan and let toast about 2 minutes or until bread is browned and cheese has started to melt.
Using a large spatula, flip the sandwich and let toast for about 2 minutes on the other side. I like to add additional butter before placing the sandwich back in the pan.
Notes
You could butter the bread ahead of time and skip adding butter to the pan.
Use a big spatula or your sandwich will fall apart.
Cover the pan so the cheese melts
Put cheese on the top and the bottom of your ingredients so they stick.