Artwork

Konten disediakan oleh Frontend First, Sam Selikoff, and Ryan Toronto. Semua konten podcast termasuk episode, grafik, dan deskripsi podcast diunggah dan disediakan langsung oleh Frontend First, Sam Selikoff, and Ryan Toronto atau mitra platform podcast mereka. Jika Anda yakin seseorang menggunakan karya berhak cipta Anda tanpa izin, Anda dapat mengikuti proses yang dijelaskan di sini https://id.player.fm/legal.
Player FM - Aplikasi Podcast
Offline dengan aplikasi Player FM !

Type safety from Hasura to SWR

55:30
 
Bagikan
 

Manage episode 339984605 series 1635850
Konten disediakan oleh Frontend First, Sam Selikoff, and Ryan Toronto. Semua konten podcast termasuk episode, grafik, dan deskripsi podcast diunggah dan disediakan langsung oleh Frontend First, Sam Selikoff, and Ryan Toronto atau mitra platform podcast mereka. Jika Anda yakin seseorang menggunakan karya berhak cipta Anda tanpa izin, Anda dapat mengikuti proses yang dijelaskan di sini https://id.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

185 episode

Artwork

Type safety from Hasura to SWR

Frontend First

197 subscribers

published

iconBagikan
 
Manage episode 339984605 series 1635850
Konten disediakan oleh Frontend First, Sam Selikoff, and Ryan Toronto. Semua konten podcast termasuk episode, grafik, dan deskripsi podcast diunggah dan disediakan langsung oleh Frontend First, Sam Selikoff, and Ryan Toronto atau mitra platform podcast mereka. Jika Anda yakin seseorang menggunakan karya berhak cipta Anda tanpa izin, Anda dapat mengikuti proses yang dijelaskan di sini https://id.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

185 episode

Semua episode

×
 
Loading …

Selamat datang di Player FM!

Player FM memindai web untuk mencari podcast berkualitas tinggi untuk Anda nikmati saat ini. Ini adalah aplikasi podcast terbaik dan bekerja untuk Android, iPhone, dan web. Daftar untuk menyinkronkan langganan di seluruh perangkat.

 

Panduan Referensi Cepat