Peel and chop the onion. Chop the ham. Heat the fat in a pot. Brown onions and ham in it. Dust with flour and sauté while stirring. Add stock and milk while stirring, bring to the boil and simmer for 4-5 minutes. Coarsely chop the walnuts.
Wash the basil and cut into fine strips except for a little garnish. Put the ravioli in plenty of boiling salted water and let it simmer for about 2 minutes. Stir the parmesan and ricotta into the sauce and season with pepper. Pour the ravioli onto a sieve, rinse briefly in cold water and drain. Arrange the ravioli with the sauce on plates. Sprinkle with walnuts and basil and garnish