Preheat the oven to 350° and set a rack to the middle position. Generously grease the 11-by 7-inch baking baking dish with butter and set aside.
In a medium bowl, whisk together the flour, cinnamon, baking powder, salt, and baking soda. Set aside. In the bowl of a standing mixer at high speed or using a hand-held mixer, beat together the butter, sugar, and egg until pale, about 2 minutes. Add the walnuts and apples and stir by hand until evenly combined. Add the flour mixture and stir until combined, another 30 seconds.
Spread the batter into the prepared pan and bake until golden brown and lightly firm to the touch, 40 to 50 minutes. Let cool on a rack for 30 minutes, then cut into 12 bars and transfer to a serving platter.