For the bacon-corn gnocchi au gratin, first prepare the gnocchi: Mix flour with 1 egg, milk, salt and melted butter to a dough.
Bring salted water to a boil in a saucepan and pour the gnocchi through a sieve into the water. Cook the dumplings for about 5 minutes and strain. Cut the onion into small pieces and fry in a little oil until golden brown.
Cut the pancetta into strips and fry them as well. Mix the bacon and onion mixture with the dumplings, add the corn and season with salt and pepper. Put the mixture into a baking dish.
Mix the sour cream with the eggs and pour over the dumplings. Sprinkle the grated cheese on top and bake in the oven at 180 °C for about 20 minutes.