Mix warm water, sugar, yeast, and a small portion of the flour. Let the mixture rest for 15–30 minutes until it becomes bubbly.
Add the remaining liquid ingredients: eggs and vegetable oil. Mix well. Sift the remaining flour into a bowl, add salt, and pour in the liquid mixture. Mix thoroughly. The dough should not stick to your hands but should remain soft. If it’s too stiff, add a bit of oil or water; if it’s too sticky, add a little flour. Cover the dough with cling film and leave it to rise in a warm place for 1 ½ hours.
While the dough rises, prepare the filling. Peel the apples, remove the cores, and grate them on a coarse grater. Place them in a pan greased with oil and stew over low heat until soft. Drain the excess liquid and add the spices.
Remove the pits from the dates and place them in a food processor along with the walnuts (set aside a few walnuts for topping). Pulse until the mixture is chunky. Combine with the sautéed apples, then add raisins and lemon juice. Mix the filling thoroughly.
Divide the dough into 4 equal parts. Roll each part into a rope, then flatten each rope into a ribbon. Spread the apple-date filling along the length of each ribbon, then pinch the edges together to form 4 filled ropes.
Carefully braid the ropes into a long challah, then connect the ends to form a ring. Place the ring on a baking tray lined with parchment paper.
Sprinkle the challah lightly with water, brush it with beaten egg yolk, and top with the reserved crushed walnuts and brown sugar.
Let the challah rest for 30 minutes to rise.
Bake for 25–30 minutes at 180°C.