What your appetite may favor, is probably what is healthy, too. This is a theory, as I infer from a hadith of our prophet Muhammed (s.a.s.), as well as from folk-wisdom.
A framework, a theory, for formulating remedies, with food:
If that very food is not available, for yourself, or for your baby, infer what other food may replace that. The infirmaze-people, or doctors, may take that as a tip for diagnosis. e.g: If it is for carrots, does that point to a vitamin-A need/deficiency? If yes, it is fine to replace with other food - if rich with vitamin-A.
A replacement is not trivial, though. Any food/herb may have many remedies. Find these, in folk-medicine. e.g: carrots, onion, or lemon, are with many functions.
To infer what to replace with what, an infirmazer may take into account
Any remedy information, is fit for infirmaze. Therefore, a resource-replacement know-how is fine, too.
A warning. The flavor, and bodily-need phenomena are important. Yes, but unfortunately, there exist other psychological mechanisms, too, and the industrialized-food, or specifically the advertisement people, may (attempt to) manipulate those mechanisms, to override what your body would favor.
For example, to eat potato-chips in a glossy package, with lively colors, does not make those potato-chips, any more, or less healthy. It is an extraneous junk-bias that takes your attention away. The good news is that, if every food is packaged with the equal, the theory that I offer/infer, may hold. i.e: People may prefer their really-needed food, if other things are kept equal, i.e: fair-presentation, for all food.
For example, a father, or a mother, may present potato-chips and cheese and milk, in equally fine bowls - not in the wrappers they were bought with.
That hadith is to suggest that, when a patient may crave a food, let him/her eat it. e.g: A radio/tape speaker, M.Z.Kotku(Rh.A.), had told of an example he knew, where a patient wanted onions while in hospital, and was healed with it, after he ate that - although that was not let by the doctors (either forbidden, or as a general-hospital policy).
It is [millenia-old] folk-wisdom, as old-wives knew, that if you do not give a craved-food to a pregnant woman, the baby may be an idiot, etc. As with most such wisdom, this may have its context, and also where it is wrong, but it also inspires the theory, that I infer.
If that need is neglected, in cases of severe deficiency, that may lead to the symptoms, e.g: lack mental-development. If that food was needed for another need, that may appear as that other symptom - even if less noticeable than a mental-deficiency.
When I was yet to get born, my mom was lemon-craving. I favor lemons, and sour-cherries even today. It was what I preferred, even then. And mom tells me that, after I was born, she found their taste very sour, although when I was not born (a few days ago) she even criticized that, they were not sour.
I remember that I had heard of an experiment conducted by Premack, of the Premack-principle fame, that the kids may favor their food right - whether to eat proteinful or sweet food. It was what each would really need. Although this is possibly explainable with the novelty of that, for the deprived children, I take this as a probable fit to the theory I infer.
There are hadiths about the amount of food, too:
To sip the liquid, is fine to avoid the cold-hit to your stomach, as well as it gives the mouth-borne saliva, its chance to keep effective. Excess water, taken with food, is noticed to cause problems with digestion - as the enzymatic-liquid is rareified.