Melt a tablespoon of butter in a pan, fry the gnocchi on both sides and remove from the pan. Melt the diced garlic and tomatoes in the pan. Mix everything in a bowl.
Now add grated parmesan and 2-3 tablespoons of pesto. Season to taste with salt and pepper. Add a little oil if necessary.