For the dough: Using an electrical mixer, stir together flour, ½ tsp salt, 100g cream cheese, 100g butter and one egg. Cover dough with plastic wrap and set in the fridge for an hour.
Cut the squash into slices. In large pan, heat 1 tsbp of the olive oil and cook the onion until soft. Add the rest of the oil and cook the squash for about then minutes. You can also bake the squash in the oven. Season with salt and pepper
Grease a round tart/quiche pan with the rest of the butter. Roll out the dough on a floured surface and line your tart pan. Spread out the squash on the dough.
Preheat oven to 400F
Whisk together the remaining cream cheese, the ricotta, thyme leaves and the remaining three eggs. Season with salt and pepper. Pour the mixture over the squash and sprinkle with Gruyere.
Bake for 35-40 minutes until the top is slightly golden. Let cool slightly before serving.