Yes, you can eat Gruyere cheese, even if it is unpasteurized, during pregnancy. The process of making Gruyere cheese involves heating milk in high temperatures. So, even if the cheese is made using unpasteurized milk, the cooking and curing process kills all harmful bacteria.
As a tip, remember that most hard cheeses are considered to be safe for pregnant women.
So go ahead, indulge in that delicious Chicken Cordon Bleu or a lipsmacking fondue with Gruyere cheese in it!