Spaghetti?

Can I eat spaghetti while pregnant? I read it’s not good while pregnant and also it depends on what kind? I am really craving it and I hardly ever want it