Does too much sugar cause diabetes or is that just an old wives tale?

I’ve been eating a lot of sugar lately. Diabetes doesn’t run in my family but I’ve heard too much sugar can cause it. Is this true?