This is usually a symptom of something stuck in the mouth or GI tract that the cat is trying to dislodge.It can also be an oral sore.
Check the inside of the mouth for any abnormalities.If you do not see anything put vaseline on her paws for her to lick off.
She may have swllowed something like plastic,earing post, string,, etc or have a hairball
Try feeding her something oily like tuna in oil or add a bit of olive oil to her canned food.
If she was exposed to any other cats she may have an upper respiratory virus.
All cats carry upper respiratory virus on their own fur. Cats that live together become immune to the carried strain but as soon as the bacterium is exposed to another cat it will infect them.
Feed her very odorous food so she will keep eating. She may be slightly dehydrated or hypoglycemic. Immediately put drop of pancake syrup on her tongue to raise her blood sugar. .Give her a few droppers (cc or ml size)of unflavored pedialyte every ten minutes for half hour - repeat every four hours througout the day to hydrate her and balance her electrolytes.
Antibiotics must be given with food or they will cause vomiting. If she is congested, you can also take her in a steamy bathroom where you have run a hot shower to break it up.
If she developes any colored mucus that means the infection has turned bacterial and will respond better to an antibiotic.Some vets script one even if it is viral to prevent secondary infections like pneumonia. So just watch this baby very carefully!! Inappetite, is very dangerous in a cat and so is dehydration. colored mucus, etc.If she seems any worse or stops eating she should be seen by a vet.
I am concerned that if the heaving continues she may stop eating and that would be very dangerous for her.
Please let me know how she is doing. I will be here all weekend if you get worried.
Sincerest best wishes,