Preheat the broiler to high heat.
Melt the butter in a large ovenproof skillet over medium heat.
Add the onions and cook until softened, about 3 minutes.
Add the ham and thyme and continue to cook until the ham is lightly browned.
Add the chicken broth and ¾ cup water and bring to a simmer.
Add the gnocchi, stir well, cover and cook until the gnocchi is slightly tender, about 5 minutes.
Remove from the heat.
Uncover and stir in the peas, cream, ¼ teaspoon salt and ¼ teaspoon pepper.
Sprinkle the cheese over the top and broil until golden and bubbly, about 3 minutes.
Serve.
