jakala-na / next-contentful-starterkit

https://next-contentful-starterkit.vercel.app/
MIT License
2 stars 0 forks source link

Evaluate gql.tada as alternative to graphql-codegen #15

Closed asgorobets closed 6 months ago

asgorobets commented 8 months ago

gql.tada is promising new library that potentially gives full typescript support to your GraphQL data-fetching, all while potentially eliminating the build/codegen step need.

https://github.com/0no-co/gql.tada

Required criteria:

Optional GraphQL Codegen Client Preset has a cool idea of fragment masking, which would be interesting to enforce boundaries around, but probably not required

asgorobets commented 7 months ago

Turns out gql.tada is a great tooling and a direct replacement for client-preset plugin. The codegen step can be almost completely eliminated during development (other than having a local schema file if needed for other tooling).

I my testing it went from 5-7 second delays when adding/removing fields (wait for type generation and typescript checks) to 1 second typescript checks, it's so much more seamless to run as part of Typescript server itself.

PR #30