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

preview_player
Показать описание
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.

00:00 Introduction
05:00 Generate typescript from GraphQL
08:00 Inject Query Data Generic
10:30 Inject Query Variables Generic
Рекомендации по теме
Комментарии
Автор

Where have you been all this time, man? Your videos are very high quality and incredibly useful. I was going to start a project and I saw your video. Please keep making such high end videos. Thanks 🔥

FurkanGulsen
Автор

Thank you very much for your excellent content in the channel, please continue with authorization and microservices with nestjs and prisma

andresmauricioromerolopez
Автор

bro I love your content please please make amazing project withe next.js and typescript please bro full project

natnael-oqp
Автор

More about Microservice in nestjs please!

TheThornTech
Автор

I launched your project from github and after 'yarn prestart' got error with code 1 in console. What do i need to do to prevent it?

alexsoft
Автор

Hooks can be used in redux. How to use it with redux

mahendrasinhgohil
Автор

hello, thank you for the efforts you put in these amazing videos, are you planning to post a crash course about building microservices with nestjs ??

fadygamilmahrousmasoud
Автор

подписался, хоть понятно что говоришь

create_your_reality_faster