You can use the GraphQL Code Generator library to generate TypeScript types for your code.
Backend
GraphQL Code Generator can automatically generate types from .graphql
schema files; you can then use these types to write your queries and resolvers. For more information and examples, see the GraphQL Code Generator docs.
Frontend
There are two ways to generate types in your frontend web app; you can provide a URL to your GraphQL API or write queries in .graphql
files. For more information and examples, see the GraphQL Code Generator frontend docs.
Comments
0 commentsPlease sign in to leave a comment.