TypeScript API Type Generation from a GraphQL Schema

Опубликовано: 08 Октябрь 2022
на канале: Michigan TypeScript
496
7

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
09:30 GraphQL codegen plugin from The Guild (https://www.the-guild.dev/graphql/cod...)
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!

Recorded on September 6th 2022 at Cahoots (https://cahoots.com) in Ann Arbor, Michigan.


Смотрите видео TypeScript API Type Generation from a GraphQL Schema онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Michigan TypeScript 08 Октябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 49 раз и оно понравилось людям.