Let the gnocchi soak in salted water according to the instructions on the packet. Mix the cream cheese, if it is natural, with herbs as desired.
Dice the onion and garlic, cut the ham into thin strips. Heat some oil in a saucepan and fry the onions, garlic and ham. Deglaze with the white wine and add the stock. Add the amount of peas you want and season everything with salt and pepper. Bring to the boil briefly. When it has boiled, turn the stove on to the lowest possible heat and stir in the cream cheese and let it melt.
Drain the gnocchi and add to the sauce. Mix everything and season again.