Player FM ऐप के साथ ऑफ़लाइन जाएं!
Type safety from Hasura to SWR
Manage episode 339984605 series 1635850
Ryan shares his experience getting end-to-end type safety from a Hasura backend into a React application. He tells Sam about the different ways GraphQL codegen can be used to generate types, and how he ultimately landed on a solution that combines the TypedDocumentNode type and the zod library.
Topics include:
- 0:00 - Intro
- 2:51 - Using GraphQL Language Server to get autocomplete + linting
- 13:05 - Getting type information on the return object from a query passed to SWR
- 24:06 - Generating TypedDocumentNode objects with GraphQL codegen
- 33:33 - Using zod for run-time validation
Links:
185 एपिसोडस
Manage episode 339984605 series 1635850
Ryan shares his experience getting end-to-end type safety from a Hasura backend into a React application. He tells Sam about the different ways GraphQL codegen can be used to generate types, and how he ultimately landed on a solution that combines the TypedDocumentNode type and the zod library.
Topics include:
- 0:00 - Intro
- 2:51 - Using GraphQL Language Server to get autocomplete + linting
- 13:05 - Getting type information on the return object from a query passed to SWR
- 24:06 - Generating TypedDocumentNode objects with GraphQL codegen
- 33:33 - Using zod for run-time validation
Links:
185 एपिसोडस
Alle episoder
×प्लेयर एफएम में आपका स्वागत है!
प्लेयर एफएम वेब को स्कैन कर रहा है उच्च गुणवत्ता वाले पॉडकास्ट आप के आनंद लेंने के लिए अभी। यह सबसे अच्छा पॉडकास्ट एप्प है और यह Android, iPhone और वेब पर काम करता है। उपकरणों में सदस्यता को सिंक करने के लिए साइनअप करें।