Method
Preheat the oven to 180°C. Place potatoes on a baking tray and bake for 1 hour until cooked through; let cool slightly. Halve potatoes and scoop out the flesh into a bowl. Mash until smooth.
Add parmesan and flour, season with salt and pepper, and mix to combine. Add egg yolks and stir until the mixture comes together. Turn out onto a lightly floured surface and knead for 1 minute. Divide dough in half and roll each piece out into a 50cm log. Using a sharp floured knife, cut into 3cm-long pieces and place them on a floured baking tray.
Heat oil in a large frying pan. Add garlic; cook for 1 minute. Add tomatoes, sugar, and vinegar, and cook, stirring, for 12 minutes or until the sauce thickens. Season with salt and pepper.
Cook gnocchi in batches in a pot of salted boiling water for 3-4 minutes or until they float to the surface and are firm. Add to a pan of tomato sauce; toss to coat. Place in 4 serving bowls; scatter with basil and extra parmesan.