Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Do not mutate exports.dmmf in generated Prisma Client #420

Closed
sdnts opened this issue Jan 17, 2020 · 0 comments
Closed

Do not mutate exports.dmmf in generated Prisma Client #420

sdnts opened this issue Jan 17, 2020 · 0 comments
Assignees
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Milestone

Comments

@sdnts
Copy link
Contributor

sdnts commented Jan 17, 2020

In the generated Prisma Client, we export dmmf in the index.js file. However, the PrismaClient constructor then goes ahead and mutates this export, establishing circular relations.
This means that the exported DMMF can no longer be stringified easily.
Studio needs the DMMF to be stringify-able so it can be transported via HTTP / Websockets etc.

@pantharshit00 pantharshit00 added bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug. process/candidate Candidate for next Milestone. labels Jan 22, 2020
@timsuchanek timsuchanek self-assigned this Jan 31, 2020
@janpio janpio added this to the Preview 22 milestone Jan 31, 2020
@janpio janpio removed the process/candidate Candidate for next Milestone. label Jan 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

4 participants