-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only works for Model and not embedded Type? #74
Comments
Sure, if you feel like going for a PR for this, go ahead! This will probably require adjusting the DMMF parser to look for those Type definitions, and see how to connect that to the visitor system, which visits each node of a query to look for leaves to encrypt/decrypt, with the knowledge of what model it's currently looking at. |
I'm running npm link to test some changes I made, but the require('@prisma/client').Prisma.dmmf in extensions.ts is returning undefined when I run it with my repo - ran into this before? |
This is usually a sign that you need to generate the Prisma client with FYI, if you want to explore the object structure more easily, you can use |
Thanks, it is definitely generated, I'm guessing it is trying to import from the package node_modules, instead of the source repo I linked the package to |
Yeah with npm link it may not work exactly as intended in a regular dependency install. Feel free to locally point the |
Hey sorry this has hit the backburner for me at the moment |
using mongodb and so a lot of our encrypted fields are in embedded documents, which are done by Type instead of Model: https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types
I've added this lib, but only get encryption on fields defined in Models.
Supporting types on your roadmap? Want a pr for it?
The text was updated successfully, but these errors were encountered: