---
title: "How can I generate TypeScript types from my Schema?"
canonical: "https://support.apollographql.com/space/ETKB/655556700/How%20can%20I%20generate%20TypeScript%20types%20from%20my%20Schema%3F"
format: markdown
---
You can use the *[GraphQL Code Generator](https://www.graphql-code-generator.com/)* 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](https://www.graphql-code-generator.com/docs/guides/graphql-server-apollo-yoga).

### 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](https://www.graphql-code-generator.com/docs/guides/react#apollo-and-urql).