Preheat the oven to 400F/200C. You can leave the pumpkin/squash as a large chunk with skin on, just remove seeds and any stringiness in middle. Place the pumpkin in a baking dish - no need to add oil - and roast until tender, around 25 - 40 minutes. Remove from oven but leave in dish.
Towards the end of the pumpkin cooking, cut the potato into large chunks, leaving skin on and place in a pot/pan. Cover with cold water then bring to a boil and simmer around 10 minutes, or more as needed, until tender to the knifepoint and cooked. Take care not to overcook as you don't want them waterlogged. Drain the pot and leave the potatoes in the warm pot, uncovered, to help them steam and dry out a little.
Peel both the potatoes and squash are still hot - you can let them cool slightly so you can handle them, but it's worth doing when as warm as possible. Place all the peeled vegetables in the pot and mash to break up. Alternatively, press through a ricer. Take care to only mash enough so fluffy, but don't get them gummy.
Add the flour and egg yolk to the mashed pumpkin and potato and gently mix to bring together - take care not to over-mix. Transfer the mixture to a floured surface and bring together in a ball. The dough will be fairly soft.
Cut or pull off a chunk of the dough and roll it out into a log. Slice into even chunks and gently roll each piece, then either use the prongs of a fork or a gnocchi board to gently mark lines on the surface. Place formed gnocchi on a floured baking sheet , board or plate until ready to use.
Repeat with the rest of the dough until all the gnocchi are formed.
Bring a large pot of water to a rolling boil and lightly salt it. Drop a few gnocchi into the boiling water at a time, being careful not to overcrowd the pan and keeping the water boiling.
Once the gnocchi rise to the top, remove with a slotted spoon and place in a dish while you cook the next batch. If they don't rise after a couple minutes or some do but others don't, nudge them gently as they may have stuck to the bottom.