Preheat your oven to 180°C (350°F).
Place a medium pan or skillet over medium-high heat --- pour and heat the olive oil.
Add the chopped onion and saute until it softens.
Add the bits of ham, mix, and cook for a couple of minutes.
Pour the stock and turn the heat to medium-high --- leave uncovered for two minutes, mixing occasionally.
Add the cream and half of the cheddar cheese, mix, and season with salt and ground black pepper.
Add the gnocchi and combine to coat them with the sauce.
Keep them in one layer and sprinkle the top with the remaining cheese.
Place your cheese and ham gnocchi in the oven for thirty to thirty-five minutes --- change the setting to grill for the last eight minutes to get an even more golden top.
Remove from the oven and set aside for at least five minutes to cool.
Your cheesy ham gnocchi is now ready --- serve and enjoy!