Preheat oven to 350°F and grease a 9x5 inch loaf pan.
In a bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, nutmeg, and allspice.
In another bowl, beat eggs with oil, brown sugar, granulated sugar, and vanilla until smooth.
Stir in grated zucchini and chopped apple.
Add the dry ingredients into the wet mixture, mixing until just combined.
Fold in walnuts if using.
Pour batter into prepared loaf pan and smooth the top.
Bake for 55–60 minutes, or until a toothpick comes out clean.
Cool in pan for 10 minutes, then transfer to a wire rack to cool completely.