Any reason on why Prisma would allow a non-type safe query?

Hey, recently we refactored our schema.prisma by renaming some relations. We expected that some queries would stop working and that TypeScript would warn us about these issues. Fast forward to today, when we noticed part of our website wasn't functioning. After investigating the query, we discovered that Prisma/TypeScript wasn't warning us about a missing relation that no longer exists.
No description
No description
3 Replies
Prisma AI Help
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!
Nurul
Nurul3d ago
That's strange. Are you sure that the generated PrismaClient was in sync with schema.prisma file? I assume you would have ran npx prisma generate command.
ThallesComH
ThallesComHOP2d ago
yep I did check and both images are on the same prisma client generated, it seems that when I remove the projectWhitelistTokens spread code it magically works again as shown in the first image.

Did you find this page helpful?