Whiz together the onions and garlic in a food processor to form a fine paste.
Heat the rapeseed oil in a large saucepan or jam pan to a low-medium temperature and then gently fry the paste over a low heat for 7-10 minutes.
Add your apples, thyme, tarragon, celery salt, ginger and nutmeg to your food processor and whiz until smooth (you may need to do this in batches).
Add this to your cooking pan, along with the cinnamon, bay and cloves. Cook for a minute and then stir in the sugar and continue to stir until the sugar has dissolved and you have a think brown paste.
Pour in 300ml cold water and cook for a further 2 minutes, before adding all the remaining ingredients.
Give the pan a good stir and bring to the boil, then reduce to a medium heat and simmer for 10-15 minutes.
Pour the sauce through a fine sieve into a large bowl, then repeat this process so that you get a really smooth sauce. Return the sauce to the pan and simmer over a low heat for around 10 minutes, until reduced by about a quarter.
Leave to cool completely, then either put aside for marinating/cooking if you want to use it straight away, or divide between airtight, sterilised jars and it should keep for up to 6 months.