-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix: falsy uniqueIdentifierFields causing an exception #198
base: main
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/prisma-adp/nexus-prisma/9vn7sJPto2zvdQeJpHfPPyrH6c9X |
PR welcome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we should have a test for this please 🙏
I intended to create a unit test, but I don't understand how they are structured or even how to setup my system to run them successfully.
|
@garth I'll try to review the docs and see if there are any missing steps. |
This pull request addresses a critical issue where uniqueIdentifierFields containing a falsy values cause an exception.
BTW: adding the following eslint rule would catch this kind of error:
@typescript-eslint/strict-boolean-expressions
Also related, when the library throws an error it includes all fields returned by prisma, possibly including those which are not part of the graphql schema. Meaning that sensitive data can be leaked.