Can eating a lot of sugar cause gestational diabetes?

I have craved candy so much this pregnancy. Could this increase my risk for gestational diabetes?