Steam the onions and garlic cloves in the saucepan with the lid closed in olive oil. As soon as the onions are translucent, add the tomatoes, salt, sugar, pepper and basil. Depending on your taste, you can also add various other spices such as B. Herbs of Provence, oregano, paprika or for hotter connoisseurs a small teaspoon of sambal oelek.
Then let the sauce simmer over a low flame for approx. 30-45 minutes with the lid open. In the meantime, fry the gnocchi in a pan with a little olive oil. Put everything in a baking dish and cover with the mozzarella. Bake the casserole for approx. 20 minutes or until the cheese has melted slightly.