Heat oven to 200C/180C fan/gas 6.
Unroll the pastry onto a large baking tray leave it on the paper from the pack).
Score a border, about 1cm in from the edge. Score a criss-cross pattern over the central piece of pastry, so that the middle doesn’t rise too much.
Bake for 15 mins.
Heat the oil in a large pan.
Add the onions and cook for 10-15 mins until softened.
Stir in the vinegar.
Simmer for 1 min then add the mustard and thyme.
Slice the apple thinly.
Toss the slices in a splash of vinegar to stop them from browning.
By now the pastry should be starting to colour.
Spread the onions over the middle.
Add blobs of sauce.
Add apple slices.
Add some more thyme sprigs.
Drizzle with some oil.
Place back in the oven for a further 25 mins until the cheese is bubbling.