Coffee. Wtf? Lol tmi

C
So for most of my second trimester I've been dealing with diarreah. This week my doctor told me it was okay to have a cup of coffee every morning...& I'm constipated. What is going on? Isn't coffee suppose to do the opposite? 😩