Arre, if you get fresh longan, eat 2-3 pieces for taste, but don't eat too much. Otherwise, normal grapes or litchi are much easier to find and perfectly safe.
I craved these tropical fruits so much during my pregnancy and felt so guilty eating them. Looking back, having a couple of pieces occasionally is perfectly safe, so don't deny yourself small joys.
My food tracker app says longan is high in vitamin C but also high in sugar, so skip it if you have gestational diabetes. Otherwise, a few pieces are totally fine.