How soon can gestational diabetes be detected in pregnancy?

I am barely 6 weeks pregnant and had a blood glucose test done last week, the results came back high at 220.

Does anyone know if that is too early for gestational diabetes, or do you think I had diabetes before the pregnancy and just didn't know about it?

The reason they tested so early is because my younger sister has diabetes; however, it's juvenile diabetes (Type 1). This is my first pregnancy, so I've never had the problem before.