DEV Community

Discussion on: Setting up a GatsbyJS starter with TypeScript, ESLint, Prettier and pre-commit hooks

Collapse
 
ardennl profile image
Arden de Raaij

Hey, that's dope! I'll definitely have a look at your site to see what kind of goodness I can steal from there. On that matter I was wondering, have you tried auto-generating type definitions based on GraphQL? I hade a try with graphql-code-generator but barely understood what I was looking at when I saw the output 😅. I'll have a look at it again when starting on the next post!

Collapse
 
nickytonline profile image
Nick Taylor

I don't auto-generate type definitions based on GraphQL. I'm actually still quite new to GraphQL. My Gatsby site is my only exposure to it so far. I'll check out that project though.

For now I explicitly type my data. See the github.com/nickytonline/iamdevelop... folder.

Thread Thread
 
ardennl profile image
Arden de Raaij • Edited

Thanks for your answer. Gatsby was my introduction to GraphQL as well! As I said in my article, it's a gateway-drug :D. I made my own types as well, but I feel that it should be trivial to automate. I just lack some knowledge. Hopefully, I'll have that fixed for the next blog post.