To cut the time it takes to make this pie, you could always use pre-cooked chicken, and good-quality bought stock to make the sauce. However, poaching whole legs is really economical and also keeps the meat succulent – important for pie fillings, which are normally cooked twice.
Poach the chicken first. Put the chicken legs, leek tops, peppercorns and bay leaf, if using, into a large pan with 2 litres of cold water (or enough to cover). Bring to a boil, place on the lid, leaving a little gap, then simmer over a low heat for 1 hour.
Strain into another pan (discard the leek, pepper and bay), then boil over a medium heat for 30–40 minutes, until reduced by half. Leave to cool.
Meanwhile, make the pastry. Put the flour, xanthan gum and salt into the bowl of a food processor, then pulse to combine. Add the cheese and butter, then pulse until they are completely incorporated.
Mix together the egg, mustard, 2 tablespoons of crème fraîche and 1 tablespoon of cold water until combined, then add to the processor while it’s still running, until the mixture forms a soft dough. Turn it out onto a floured surface and split into two balls, one slightly bigger than the other. Flatten into discs, wrap each one in cling film and chill in the fridge until firm.
Return to your pie filling. Once the chicken is cool enough to handle, shred the meat into bite-sized pieces and discard the bones.
Heat the oil in a large frying pan over a medium heat, then add the sliced leeks and thyme, and season. Cover and cook gently for 10 minutes, until tender but still green. Stir occasionally so they don’t catch.
Add the chicken and ham to the pan, plus the crème fraîche and 300ml of your stock. Bring to a simmer and season to taste. Mix the cornflour with 2 tablespoons of cold water until smooth, then stir into the sauce and simmer until it thickens. Tip the filling into a wide bowl or tray and leave to cool, stirring now and again.
Roll the larger piece of pastry on a floured surface and use to line a 23cm metal pie tin, leaving a little overhang. If you have any rips or tears, just pinch them back together.
If you have a pie funnel, put it in the middle of the pie. Mound the chicken filling into the pastry base. Brush the edges with the egg yolk glaze, then roll out the rest of the pastry for the top. Make a cross in the middle of the pastry to let the pie funnel through, or just cut a couple of slits in the pastry to let out the steam.
Top the pie with the other sheet of pastry. Pinch the pastry together at the rim, trim with a knife, then crimp the edges to seal. Use the excess to make decorations, if you like. Brush all over with the egg glaze, then chill for at least 10 minutes.
Preheat the oven to 200C/gas 6 and pop in a baking sheet. Glaze the pie again, then slide it onto the hot tray. Bake for 45 minutes, or until dark golden and a skewer inserted into the centre comes out hot.
Gluten-free cornflour is an ideal thickener for pies and sauces. It will turn the sauce cloudy – not an issue with creamy sauces.