-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow prisma.schema to use Json data type for session data #101
Conversation
Increases flexibility of storing type safe data from auth serialization
Hi @hugil - thanks for the fix! Looks like a great improvement. When I try to run the tests, in src/@types/prisma.ts I encounter: "Cannot find name 'JsonValue'." Where does this type live? Can you add it via Thanks again for the fix. |
import { JsonValue } from "type-fest";
Hey, thanks for spotting that. Missed the import. I've committed it now so the test should run fine! |
Hi @hugil , |
It would be good to mention in README, that you can still use |
@gLenczuk - Good point! It does feel like the docs need to be updated, for it to be clear that string @hugil - How likely is it that you will finish working on this PR? (If you don't continue, I'll probably try to finish it off - but could be a little while; I'm under water here with other work. Would love to get (both of) your advice re: whether the changes in this PR constitute a breaking change. I'm unclear on whether the |
@hugil, @gLenczuk - on reflection, it looks this prisma-session-store issue needs an alternate approach (if it is still a problem; I'm using prisma 4.3.0, with the current version of prisma-session-store, and not encountering any type issues related to string vs. json...). According to Prisma's database features table, not all dbs support json as a type - which suggests that where the db is concerned, we should probably stick with the lowest common denominator ( |
Increases flexibility of storing type safe data from auth serialization