Preheat the oven to 350°F. Grease an 8-by-8-by-2-inch baking dish.
Whisk the egg, sugar, and vanilla together in a medium bowl until thoroughly combined.
In a separate bowl, whisk together the flour, kosher salt, and baking powder.
Add the dry ingredients to the egg mixture and stir until a thick batter forms.
Fold in the chopped apple and walnuts until evenly distributed.
Spread the batter evenly in the prepared baking dish.
Bake for about 30 minutes, until the top is golden and a toothpick inserted into the center comes out without wet batter.
Let cool slightly, then spoon into bowls and serve warm with vanilla ice cream, if desired.
