I work in a team of 5. The idea here is that 50 lines of code are easy to onboard and support than 500 lines of code.

But you put out a good argument:

- What if there is another team working on the project. They need TS/GQL annotations so they could use your API.

By all means, you are free to add documentation to your API. You can work in a monorepo and have a TS type definition of your API JSON shape. You can use this type as on front as on the back. You don't need to deploy a full-blown GQL server to have API annotations available across your system. TS provides you with a cheap solution: just define a type of your JSON.

But you need to use TS on the front and on the back. Which is the way to go.


Freelancer (Upwork Top Rated Plus). Full-stack Azure cloud developer. JavaScript and TypeScript connoisseur.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store