Place a frying pan over a medium high heat and add the oil. When the oil is hot, add the onion and fry/sauté until they have turned a lovely deep brown. F they start to stick, add a little water to loosen.
1 tbsp vegetable oil, 1 large onion
Once browned, transfer to a plate and allow to cool fully.
Preheat the oven to 200C/400F/Gas Mark 6
Place the pan back on the heat and add ½ (¾ oz) of the unsalted butter. When melted add half (12 oz) of the precooked spätzle and toss to cover with the melted butter. Cook in the pan for roughly 2 minutes until light brown.
1 ½ oz unsalted butter, 24 oz spätzle
Add the contents of the pan to a large casserole dish and using a spatula flatten into one layer.
Add half (10 oz) of the cheese spreading it evenly over the layer of spätzle.
20 oz gruyere
Repeat the process with the remaining butter and the remaining precooked spätzle.
1 ½ oz unsalted butter
Add the remaining cheese over the spätzle levelling out as before.
Place the dish into the oven on the middle shelf for about 10 minutes until the cheese has melted and slightly coloured.
Remove and serve hot with the sauteed onion and finely chopped chives.