Artwork

Inhoud geleverd door Frontend First, Sam Selikoff, and Ryan Toronto. Alle podcastinhoud, inclusief afleveringen, afbeeldingen en podcastbeschrijvingen, wordt rechtstreeks geüpload en geleverd door Frontend First, Sam Selikoff, and Ryan Toronto of hun podcastplatformpartner. Als u denkt dat iemand uw auteursrechtelijk beschermde werk zonder uw toestemming gebruikt, kunt u het hier beschreven proces https://nl.player.fm/legal volgen.
Player FM - Podcast-app
Ga offline met de app Player FM !

Type safety from Hasura to SWR

55:30
 
Delen
 

Manage episode 339984605 series 1635850
Inhoud geleverd door Frontend First, Sam Selikoff, and Ryan Toronto. Alle podcastinhoud, inclusief afleveringen, afbeeldingen en podcastbeschrijvingen, wordt rechtstreeks geüpload en geleverd door Frontend First, Sam Selikoff, and Ryan Toronto of hun podcastplatformpartner. Als u denkt dat iemand uw auteursrechtelijk beschermde werk zonder uw toestemming gebruikt, kunt u het hier beschreven proces https://nl.player.fm/legal volgen.

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

188 afleveringen

Artwork

Type safety from Hasura to SWR

Frontend First

205 subscribers

published

iconDelen
 
Manage episode 339984605 series 1635850
Inhoud geleverd door Frontend First, Sam Selikoff, and Ryan Toronto. Alle podcastinhoud, inclusief afleveringen, afbeeldingen en podcastbeschrijvingen, wordt rechtstreeks geüpload en geleverd door Frontend First, Sam Selikoff, and Ryan Toronto of hun podcastplatformpartner. Als u denkt dat iemand uw auteursrechtelijk beschermde werk zonder uw toestemming gebruikt, kunt u het hier beschreven proces https://nl.player.fm/legal volgen.

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

188 afleveringen

Alle afleveringen

×
 
Loading …

Welkom op Player FM!

Player FM scant het web op podcasts van hoge kwaliteit waarvan u nu kunt genieten. Het is de beste podcast-app en werkt op Android, iPhone en internet. Aanmelden om abonnementen op verschillende apparaten te synchroniseren.

 

Korte handleiding