If frozen, let the spinach thaw. For the spaetzle dough, mix together durum wheat semolina, spinach, water, 1 teaspoon salt and a little grated nutmeg. Add the flour and mix with a dough hook and mixer to form a smooth, tough dough. Let rest for 30 minutes.
Peel the onions, cut into fine rings and brown in the margarine at a low temperature for 10-15 minutes. Bring plenty of salted water to the boil. Plane the spaetzle into the boiling water and remove it when it floats on the surface.
Put the spaetzle in a casserole dish greased with margarine and keep it warm in the oven at approx. 200 ° C. When all the spaetzle are ready, sprinkle them with onions and cheese in the pan and bake for 5 - 10 minutes.