by it_citizen · 4y ago · 0 comments
Being able to automatically type the network responses on the frontend is huge. Never before had I such confidence in the FE code I am writing. My entire FE project is typed end to end without any manual assumption and things work most of the time on the first successful compilation.
In my experience, the open source tooling around GraphQL is much better than the tools that generate types from other SDLs like protobufs.
This makes it really easy for servers and clients to behave in a typesafe manner.
I've seen a backend service / front-end SPA use REST, grpc and then GraphQL to communicate. Type safety has been the easiest to understand and scale across the eng team using the GraphQL ecosystem.
A strong type system, combined with a GraphQL code generator and typescript, has been an amazing experience as both front and back end developer. Not only do I have types for the backend (for the Things like input args as well as models), I have types for the front end, as well as easy to use hooks to utilise them in React. During development, we constantly fetch the latest schema and check if anything has changed, If so the build breaks then and there, highflying which queries are no longer valid.
The development experience has been amazing, and much more productive than and REST based workflow I’ve used, purely because of the type system.