The version with the pluralform "...the apples" should be accepted as well.
In Hungarian the names of fruits or vegetables are usually used in singular form also for the case, that you mean more than for instance one apple.
The pluralform is used for showing different kinds of apples.
I agree. In Hungarian many nouns, besides the names of fruit and vegetables, can be used in the singular, collective sense.
Version "We are cooking the apples" should be the correct one. In Hungarian, singular form can be used for general case. E.g. Félek a póktól = I am afraid of spiders (and not literally "I am afraid of the spider")