Тёмный

Next.js Storefront: GraphQL Codegen, TypeScript & TypedDocumentString 

Zaiste Programming
Подписаться 18 тыс.
Просмотров 3,9 тыс.
50% 1

GraphQL Code Generator is a robust development tool that automates the generation of code from your GraphQL schema and operations. By creating strongly-typed code in a variety of languages, catching errors at compile time, it boosts productivity and reduces errors. With its customizable and pluggable nature, it caters to a wide range of use-cases, supporting anything from TypeScript typings to React Hooks, Apollo Client code, and more. This tool offers seamless integration with existing schema and promotes consistency, efficiency, and improved overall development experience.
In this video we will be using newly introduced TypedDocumentString for automatically enhancing our GraphQL operations with TypeScript types when fetching data from our GraphQL API.
#nextjs #graphql #typescript

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@stevenbaron358
@stevenbaron358 Год назад
These series are great! thank you, guys. where is the next one!? :)
@nvcodes
@nvcodes Год назад
This was exactly what I was looking for!!! Thank you for your help. Looking forward to more of your videos :)
@NimeshkaSrimal
@NimeshkaSrimal Год назад
great video. looking forward for the next one!
@Juaaanse
@Juaaanse Год назад
When's the next episode going live? This series is awesome 👏
@ChristopherBenko
@ChristopherBenko 9 месяцев назад
Hey, really enjoyed video 1 & 2, but cant seem to find the next videos was this project abandoned?
@hazemturki
@hazemturki 8 месяцев назад
Source code?
@pawel_890
@pawel_890 Год назад
It don't like this approach. Now you have a lot of boilerplate code, Types are not automated, and there are casting of types.
@zaisteprogramming
@zaisteprogramming Год назад
Interesting! Could you elaborate? From my perspective we have just GraphQL files that we need to define the shape of responses (only queries so far) and the `execute` that connects it, the rest is generated and I wouldn't call it boilerplate. Still, there are a few improvements we are going to make here.
@typeofweb
@typeofweb Год назад
Quite the contrary! Types are automatically inferred based on the TypedDocumentNode or TypedDocumentString :) If you dislike using fetch directly (the part that you called "boilerplate") and don't mind adding a dependency, you can try using `graphql-request` instead. However, I highly recommend sticking to bare `fetch` as it really makes it easier to pass next-specific options to it :)
@pawel_890
@pawel_890 Год назад
@@zaisteprogramming There is a lot of boilerplate code in the 19:19 - the execute function has a lot of "dependencies logic", and when I as saw casting as GraphlQLResponse... ech
@inderjotsingh5868
@inderjotsingh5868 3 месяца назад
@@typeofweb About next specific options ,for caching i don't think they work since we are using post request
@typeofweb
@typeofweb 3 месяца назад
@@inderjotsingh5868 Next.js / React cache also works for POST requests.
Далее
🦊🔥
00:16
Просмотров 752 тыс.
Сколько стоит ПП?
00:57
Просмотров 319 тыс.
LOLLIPOP-SCHUTZ-GADGET 🍭 DAS BRAUCHST DU!
00:28
Codegen: The good, the bad and the ugly
6:37
Просмотров 31 тыс.
Next.js 13… this changes everything
6:16
Просмотров 779 тыс.
The Story of Next.js
12:13
Просмотров 580 тыс.
🦊🔥
00:16
Просмотров 752 тыс.