Город МОСКОВСКИЙ
00:12:27

MN - 5-14 Update Course Meta Endpoint

Аватар
Цифровой бомжара
Просмотры:
5
Дата загрузки:
05.01.2025 19:14
Длительность:
00:12:27
Категория:
Обучение

Описание

In this lesson we update our course meta endpoint to grab our data using Prisma.

We use the include shortcut along with generated types for added type safety. We then update the useCourse function to use our new type, and get rid of most of our custom types (that are now redundant).

Finally, we delete the courseData from the server. All data is now being served from our database!

UPDATE, December 2023: There’s a bug in this lesson that’s fixed in lesson 6-2, but the code repo has been updated to include this fix a bit earlier on so the app continues to work as expected.

Generated types in Prisma: https://www.prisma.io/docs/concepts/components/prisma-client/advanced-type-safety/operating-against-partial-structures-of-model-types

source: git/commit/5f6659d0e95379e4e7722355f8188dfe475caca7

Рекомендуемые видео