First wash the pumpkin and cut it into small cubes. Peel the onion and cut it into small cubes.
Now heat the butter or oil in a pan. Add the pumpkin cubes and lightly roast. Add onion cubes and sauté until translucent.
Deglaze with white wine, let it boil down briefly and then fill up with a little vegetable stock, just so that the pumpkin is half covered. Stir in between. Then add the cream, let it boil down until creamy and season with sugar, nutmeg, salt and pepper.
In the meantime, cook the gnocchi.
The sauce is ready when the pumpkin is soft but still slightly firm to the bite and the sauce has a creamy consistency. Put the gnocchi in the pan, stir briefly and serve.