For the pastry: Combine the flour, butter, beaten egg, and salt in a food processor.
Pulse until a rough ball of pastry forms around the blades of the processor; add a little iced water if it's too dry or more flour if too wet. Turn out and shape into a ball; wrap in clingfilm and chill for 1 hour.
After chilling, preheat the oven to 180°C (160° fan) | 350F | gas 4.
Roll out the pastry on a lightly floured work surface into a large round approximately 1/2 cm | 1/2" thick.
Lift the pastry into a 20 cm | 8" fluted tart tin or pie dish, pressing it into the base and sides with your fingertips.
Cut away any excess overhanging pastry and prick the base all over with a fork. Line with greaseproof paper and fill with baking beans.
Blind-bake until the pastry is starting to colour at the edges, 10-15 minutes. Remove from the oven and discard the beans and paper. Reduce the oven to 170°C (150° fan) | 325F | gas 3.
For the filling: Beat together the eggs, egg yolk, milk, crème fraîche, half the Gruyère, 1 tsp salt, and 1/2 tsp black pepper in a mixing bowl.
Ladle the mixture into the lined pastry; arrange the courgette and cherry tomatoes in the filling. Scatter the remaining Gruyère on top.
Bake until the pastry is cooked through and the filling is set and starting to colour on top, 40-50 minutes.
Remove from the oven and let cool on a wire rack. Serve warm or at room temperature with a garnish of basil.