Dauphinois, french Onion and a pithivier walk into a bar. We actually can't think of a good way to finish that joke, but the end result would be this absolute belter of a recipe. The perfect centrepiece for a delicious weekend meal.
Heat the butter in a large, deep sided frying pan and add the onions. Add the thyme and salt then cook them down over a low heat until they are caramelised, sticky and a dark brown.
Deglaze with a splash of the cognac and add the beef stock. Cook until really reduced, thick and jammy. Set aside to cool.
Use a mandolin or very sharp knife to cut thin slices of the potatoes - they should be opaque when you hold them up to the light.
Place them in a large saucepan with the cream, milk, peppercorns and thyme and a big sprinkle of salt.
Bring them up to a simmer and cook until they are just cooked through, then remove them from the poaching liquid.
Preheat the oven to 180°C. Cut a dinner plate sized circle of puff pastry out. Place it on a sheet of baking paper on a tray. Place a few layers of potato in a smaller circle in the middle, topped with some caramelised onions and chunks of gruyere.
Repeat this using the remaining potatoes, onions and cheese to make an even mound.
Use a larger plate to cut another round of puff pastry and drape this over the mound, pinching the pastry disks together to seal in the filling. Decorate it if you want, but you don't have to!
Brush with the egg yolk and place it in the fridge to firm up. After 20 minutes, brush it again, then place it in the fridge once more for a further 20 mins. Finally, brush it one last time before baking it for 40 to 60 minutes. Serve warm.