Apollo Codegen In React - Generate Typescript Types from GraphQL Schema and Queries

Опубликовано: 01 Январь 1970
на канале: Code with Vlad
14,152
193

Graphql codegen / Apollo codegen is a great feature!
When working with GraphQL and Typescript in React, we want to be able to have typescript autocompletion on the variables we pass to our queries and mutations as well as on the data that is being returned from them.

You can do it manually by inserting a type or an interface as a generic inside your useQuery() or useMutation() hook. However, this process is extremely error-prone and is not DRY.

In this tutorial, we are going to see how to automate the generation of typescript types from the GraphQL schema.

Github link: https://github.com/vladwulf/apollo-co...

00:00 Introduction
05:00 Generate typescript from GraphQL
08:00 Inject Query Data Generic
10:30 Inject Query Variables Generic


На этой странице сайта вы можете посмотреть видео онлайн Apollo Codegen In React - Generate Typescript Types from GraphQL Schema and Queries длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Code with Vlad 01 Январь 1970, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 14,152 раз и оно понравилось 193 зрителям. Приятного просмотра!