Drain the mozzarella. Wash and halve the figs. Chop the nuts. Wash, clean, quarter and seed the tomatoes. Cut the flesh into small cubes. Crisp up the ham in a pan and dust with flour. Add figs, fry for 2 minutes.
Deglaze with tomato juice and stock. Add tomato cubes and nuts, boil down for 2 minutes at high heat. Season to taste with salt, pepper and vinegar. Wash the basil, remove leaves. Add mozzarella and basil to the sauce. Put the gnocchi in boiling salted water and let them simmer for 1 minute at low heat. Arrange gnocchi and sauce on plates