When it comes to writing Graphql APIs, there are typically two main approaches: code first or schema first.
Schema-first development has gained popularity within the node community. This method involves creating a graphql schema file (SDL), importing it, passing it to tools like apollo server, and then adding resolvers. To incorporate Typescript into this process, one can utilize a code generator such as graphql-code-generator to produce typescript definitions for the required resolvers.
Code-first implementation is more common in other programming languages. This involves defining the schema using a library and generating a schema (or schema file) from the written code. One of the advantages of this approach is that it avoids the need to define types in multiple locations.
For those opting for code-first solutions, options like Type-GraphQL and GraphQL Nexus offer solid libraries with robust typescript support. While I am biased as the maintainer, I personally recommend GiraphQL as an excellent tool for building graphql APIs in typescript.
GiraphQL:
Here's a informative talk on Prisma and why code-first approach is beneficial: https://youtu.be/5oyWwjLpUS4