findUnique is not working with variables different from "id" #10791
|
Hi, however, when I try to write a search based on the email I get an error this is the error I get in the graphql playground |
Replies: 3 comments 4 replies
|
You would need to mark the email field in your schema as |
|
I have the same problem, in my case I have this method: And I get this error in the console: |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
You would need to mark the email field in your schema as
@unique, becausefindUniquequeries only by unique fields.If you don't want to mark email as
@unique, you can try usingfindFirst