Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Creating a Prisma Client Extension (medium.com/streamdal)
8 points by jacobheric on Jan 10, 2024 | hide | past | favorite | 2 comments


Great write-up! As a frequent user of Prisma, I found your guide on extending the Prisma client really insightful. One question I have is about augmenting result data through these extensions. How do you manage to keep the typings in sync with Prisma when altering the result data? I'm curious to see how your approach maintains this with augmented data structures


Thanks! Yeah we don't currently augment the result data only the arguments. But its on our TODO list as we need to to send back stuff like error info about pipelines runs. Prisma has type utilities for this, see the Result<> stuff at: https://www.prisma.io/docs/orm/prisma-client/client-extensio...




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: