The spaetzle dough mix all the ingredients. Using a spaetzle slicer, add to boiling salted water. Simmer until the spaetzle float to the surface. Drain.
In the meantime, grate the cheese. Peel the onion and cut into rings. Dredge in flour.
Fry the spaetzle with half of the butter and the cheese. Season with salt and pepper.
Fry the onion rings in the remaining butter until crispy.
Serve cheese spaetzle sprinkled with fried onions.