Drain excess liquid from the mozzarella and cut into cubes. Keep it aside for now.
Clean half an onion and chop finely. In a pan, pour a drizzle of extra-virgin olive oil, and place oven to medium heat, then add the onion and cook until golden.
Next, add the tomato passata and season with salt, then cook the sauce for about 20 minutes, stirring with a wooden spoon so that it does not stick to the bottom and burn.
Turn off the heat before the sauce thickens too much and then add the fresh basil. Do not chop it, but leave the leaves whole.
Meanwhile, boil plenty of water, add salt, and add the gnocchi. Cook for a couple of minutes, until the gnocchi rise to the surface. Drain them with a slotted spoon and transfer them to an ovenproof dish, then drizzle with the tomato sauce and add the mozzarella cubes.
Finally, sprinkle with grated Parmigiano-Reggiano.
Bake in a preheated oven at 200°F for about 10-15 minutes, until the Parmigiano turns golden and the mozzarella is melted.