TypeScript API Type Generation from a GraphQL Schema

preview_player
Показать описание
Not only does GraphQL help clients get data effectively, but also provides a way to type its interfaces! If you want to see some state-of-the-art GraphQL API development workflows, then this is the talk for you!

00:00 who this talk is for
00:29 about Mark
01:05 overview of this talk
01:53 what is GraphQL?
02:24 looking at the GraphQL TypeScript example repo
03:45 how is GraphQL different from a REST API?
06:32 type safety with Apollo-Client and React-Query
08:57 generating TypeScript types from GraphQL
11:15 preparing the project to run generation
12:33 audience question: how do you avoid GraphQL schema duplication?
14:09 running the codegen on the CLI
14:36 looking under-the-hood at the generation
15:30 what happens if the data transfer object changes?
17:35 summary
18:32 audience question: what are the use-cases where it's not advised to use GraphQL?
19:48 audience question: avoiding duplication
20:22 audience question: would an API developer ever want to publish these types for consumers?
21:50 audience question: does the introspection API need to be public?
22:57 audience question: is this easier with a monorepo?

Mark Min Kim a developer who’s passionate about solving problems with software. Currently learning a lot with Kong’s Insomnia team in the world of Electron and client side networking!

Рекомендации по теме
Комментарии
Автор

You can also generate typed mutations and queries, really useful

charlesmuzhanye
join shbcf.ru