To begin, get the sauce on first: quarter your whole tomatoes and put in a baking dish (or add tinned tomatoes), drizzle with wine, balsamic vinegar, and olive oil. Sprinkle salt, pepper and sugar. Back in a 180C (or 200C if you need them done faster) for about 20-30 minutes until soft and just beginning to caramelise at the edges.
For the gnocchi, mix your ricotta, flour, cheese, egg, salt and pepper in a large bowl until it makes a dough. Separate into several pieces and roll them out into a 1-inch diameter log. with a sharp knife, cut through at 1cm intervals to make little discs. Spread out onto a floured surface until you are ready to cook them.
For the pesto, put the basil, cheese, nuts, salt, garlic, and olive oil into a food processor and pulse until mixed but still chunky. Check for seasoning and adjust as necessary. Feel free to add more olive oil if it is a bit dry. I like to keep it chunky to contrast with the soft ricotta gnocchi and the smooth sauce, but you make it how you like it.
Bring a large pot of salted water to boil, and cook your gnocchi in batches for 2-3 minutes until they rise to the surface. Drain and keep warm.
To make the sauce, tip the tomatoes and their juice into a blender and blend on high for 1 minute. Check for seasoning and adjust.
Toss the cooked gnocchi in the sauce and serve with chunky pesto on top with a drizzle of olive oil. Have extra cracked black pepper and cheese on the table.