Heat the oil in a large frying pan over a medium heat. Add the onion and garlic and cook for 2 minutes, or until fragrant. Add in the tomato paste and fry for 1 minute before adding in the tinned tomatoes and water. Scatter in the thyme and half the basil then season with salt, pepper and sugar then bring the mixture up to a gentle simmer.
Add in the gnocchi and turn the heat down to low. Cook the gnocchi in the sauce, stirring occasionally for 8–10 minutes, or until it is tender.
Stir in the butter then scatter with mozzarella cheese and cover with a lid for 2–3 minutes to melt the cheese.
Grate over the Parmesan cheese and scatter with remaining basil leaves before serving.