Preheat oven to 390ºF/200°C.
Grease a 13″ round baking dish.
Bring a large pan of water to the boil, salt it generously and add the gnocchi. Cook it as per the packet instructions and then drain and rinse in cold water.
Remove any peel from the pumpkin and then use a mandolin or sharp knife to cut it into thin slices (no thicker than 0.2 inch)
Peel and slice the onion into half moons.
In a large bowl, mix the cooked gnocchi, sliced pumpkin, onion, olive oil and thyme.
Whisk the cream together with the egg yolks and half of the mozzarella.
Pour the mixture over the gnocchi and then transfer to the prepared baking dish.
Sprinkle with the remaining mozzarella and parmesan and bake for 40 minutes until golden and bubbly.