Wash the potatoes, cover and cook in plenty of water for about 20 minutes. Drain the potatoes, rinse with cold water and peel. Press potatoes while still hot through a potato ricer and let them cool down for about 15 minutes.
Peel and finely dice the onion and garlic. Heat 1 tablespoon of oil in a saucepan. Sauté onion and garlic in it. Deglaze with tomatoes and cream, bring to the boil and stir in ricotta cheese. Season to taste with salt, pepper and sugar.
Wash the basil, dab dry and remove very coarse stalks. Chop the basil coarsely except for a few stalks and puree very finely with 2 tablespoons of olive oil in the universal chopper. Grate Parmesan cheese. Sprinkle potato mixture with approx. 1 1/2 tsp salt.
Knead egg, basil puree, 50 g cheese and about 200 g flour with the dough hooks of the hand mixer bit by bit. If the mixture is still very sticky, knead in a spoonful of flour. Form the potato mixture into longish rolls (approx. 2 cm Ø) on a floured work surface and cut into pieces of approx. 1 1/2 cm length.
Form pieces in your hand into a round shape and press in a pattern with the prongs of a fork. Bring plenty of salt water to the boil in a large pot. Cook gnocchi in 2-3 portions in lightly boiling water for 3-5 minutes.
If they float on top, remove them with a skimmer and let them drip off on a clean, slightly moistened tea towel. Heat butter in a coated pan. Fry the gnocchi for 2-3 minutes in portions, season with salt and pepper.
Re-heat the sauce. Pluck the remaining basil leaves from the stems. Arrange gnocchi and sauce, garnish with basil and sprinkle with remaining cheese.