Spread the softened butter over one side of each slice of bread. These will be the outside surfaces of the sandwiches.
Spread the whole-grain mustard on the unbuttered side of two bread slices.
Divide half of the grated Gruyère between the two slices, then add the caramelized onions evenly.
Top with the remaining Gruyère. Add cooked turkey if using, then close each sandwich with the remaining bread slices, buttered sides facing outward.
Heat a clean skillet over medium-low heat. Add the sandwiches and cook for approximately 3–5 minutes per side, until the bread is golden brown and the cheese has melted. Adjust the heat as needed to prevent burning.
If the bread browns before the cheese melts, reduce the heat and cover the skillet briefly to help the cheese melt.
Transfer the sandwiches to a cutting board, let rest for about 1 minute, then slice and serve warm.