Fry onions in oil until they start turning golden brown.
Add the garlic, tomatoes and grated apple. Fry until soft, then add the rest of the ingredients. Simmer for about 30 minutes. Allow sauce to reduce and thicken.
Blend either in a food processor or with an immersion blender.
Warm sauce and serve on top of patty.