Cut 3 onions into rings and half an apple into pieces. Heat clarified butter in a large pan over medium heat, add the onion rings and apple pieces, and fry for about 5 minutes until the onions are golden yellow. Push the onions and apple pieces to the side of the pan, add the 2 tablespoons of sugar to the cleared space, and let it caramelize for 2-3 minutes. Stir everything together and season with salt.
Butter a baking dish. Place the 8 dumplings in the dish, top with the caramelized onions and apple, and sprinkle the 200 g grated cheese over top.
Sprinkle pepper over the cheese. Bake in a preheated oven at 180 °C (356 °F) for 20 minutes until the cheese is melted and lightly golden.