Course lesson

Generate TypeScript Types for GraphQL Queries Using GraphQL Code Generator

We will use GraphQL code generator to generate types for the queries used in the app. You'll see how we will get the benefit of TypeScript while not having to do much typing at all ourselves.

Duration
8 min
Access
Included
Transcript
Retained from source evidence

We will use GraphQL code generator to generate types for the queries used in the app. You'll see how we will get the benefit of TypeScript while not having to do much typing at all ourselves.

This way we know what data is being passed around our application through TypeScript.

Resources:

  • GraphQL Code Generator: https://www.graphql-code-generator.com/

Checkpoint: Generate types with graphql codegen