Artwork

Content provided by Frontend First, Sam Selikoff, and Ryan Toronto. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Frontend First, Sam Selikoff, and Ryan Toronto or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

Type safety from Hasura to SWR

55:30
 
Share
 

Manage episode 339984605 series 1635850
Content provided by Frontend First, Sam Selikoff, and Ryan Toronto. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Frontend First, Sam Selikoff, and Ryan Toronto or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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:

  continue reading

191 episodes

Artwork

Type safety from Hasura to SWR

Frontend First

209 subscribers

published

iconShare
 
Manage episode 339984605 series 1635850
Content provided by Frontend First, Sam Selikoff, and Ryan Toronto. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Frontend First, Sam Selikoff, and Ryan Toronto or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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:

  continue reading

191 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide