In a thick-bottomed pan with a lid on, gently cook the onions and thyme, without colouring, in the vegetable oil until soft.
Add the butter and continue to cook for a few minutes. Add the flour and stir on a low heat for another minute or so.
Slowly add the cider, stirring constantly, then gradually add the vegetable stock. Bring to the boil and simmer for 1 hour.