Type safe resolvers with GraphQL Code Generator

preview_player
Показать описание
Detect errors while building your GraphQL API at build time instead of runtime with TypeScript. Also learn how to use resolver maps to separate database/GraphQL types.

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

I love how you are explaining so many important concepts in such a short video!

UriGoldshtein
Автор

Good explanation. I couldn't find any information of how to specify different return type of the resolver function till I watched this video. You described it well. Thank you

romanmahotskyi
Автор

Hello Jamie, I made a small graphql server with Apollo Server, and tried this graphql-codegen but keep getting "Cannot use GraphQLInputObjectType "AddCategoryInput" from another module or realm." Some people said that it could be because of different graphql versions but I checked with npm ls graphql they are all fixed to 16.6.0

Do you know what could be the error here ?

suatbayrak
Автор

clean explanation in short time <3, btw what font and theme are you using in vs code?

sumiboi
Автор

Typing resolvers: Resolvers is great if its in 1 file but what about when its in many?

dreamystify
Автор

Jamie, thanks for the video! That mappers bit is super helpful. I noticed that the generated resolver type doesn't enforce presence of a field resolver (e.g., a `Cart.id` resolver is marked as optional), even though it's required for correct functioning. I tried setting `avoidOptionals: true`, but that makes all field resolvers required, including those that match attribute names. Do you have any ideas on how to address this?

freeatnetcom
Автор

Thanks for the video! Do you know what's a nice approach to keep our typeDefs in separate files while using this tool? I've seen in the official docs they centralize everything in one schema.graphql (sorry if the question is a little silly, I'm learning GraphQL.)

robp.
Автор

I love typescript but every time I start a new library or framework my head explodes 😂

igdev
Автор

What extension are you using to get a live view of the typescript types?

jackwright
join shbcf.ru