1. Bring about 1 liter of water to a boil.
2. Place the gnocchi in the boiling water and let them cook according to the cooking time indicated on the package.
3. In a small saucepan, pour the heavy cream, wait for it to heat up, then add the Parmesan cheese.
4. In a frying pan, sauté the onions in a little butter, then add the bacon and cook until crispy.
5. Stir until the cheese is melted with the cream.
6. Add the onions and bacon to the cream-Parmesan mixture (and not the other way around), stir well, then add a tablespoon of cornstarch diluted in a little water.
7. Stir until the sauce thickens.
8. When the gnocchi are cooked, drain them and return them to the pot, pour the sauce over them and mix well until all the gnocchi are well coated with sauce.
9. Add the 2 egg yolks and stir again.
10. It's ready!