Preheat the oven to 200°C/180°C fan/gas 6. Put the squash and sweet potato in a roasting tin, drizzle with the oil, sprinkle over the onions, thyme, cinnamon and half the chilli. Season; bake for 30 mins.
Meanwhile, toast the nuts in a dry frying pan over medium low heat for 5 mins. Turn off the heat, add 2 tbsp maple syrup, the sea salt and remaining chilli flakes, then toss to coat; tip onto a plate.
Stir the gnocchi into the roasted veg along with the remaining maple syrup and bake for a further 25 mins.
Dot the blue cheese over the gnocchi and bake for 5 mins more. Scatter over the nuts and extra thyme to serve.
