I have recently started cooking with whole wheat flour because of the nutrition and flavor. I recently made a squash casserole using whole wheat flour. I put it in the fridge until I had time to bake it the next day. When I took it out of the fridge, it had turned dark on the top. What happened and why did it turn dark? Was it the flour or was it in the fridge too long?--Donna
Actually, it is probably neither of those things.
Without actually seeing your recipe, it is hard to say what happened, but some recipes for squash casserole call for diced or grated raw squash and/or other vegetables, such as carrots. If that is the case for you, what may have happened is that the raw ingredients oxidized in much the same way as many raw fruits and vegetables will after they have been cut. You likely sliced apples ahead of time, only to find when you are ready to use them that they have turned brown on the outside.
This is caused by the release of an enzyme naturally found within the cells of fruits and vegetables. As long as the enzyme is safely tucked away inside undamaged cells, nothing happens, but once the cell wall is damaged through cutting, mashing or some other mechanical action, the enzyme is released and starts to cause browning.
Had you covered the unfinished casserole with plastic wrap, that still may not have been sufficient to keep oxygen out. As described in How to Stop Guacamole from Turning Black, not all plastic wraps are effective at keeping oxygen out.
Chances are good that had you cooked the casserole immediately after it was assembled there would have been no browning.