Allow any field in Prisma

Viewed 82

How do I allow any field to be added in Prisma? What I mean by this is something like [key: String]: String in TypeScript. I use mongoDB as a database.

1 Answers

Prisma doesn't allow passing objects to query methods (e.g. CRUD Methods) with additional fields. You would need to filter out the object with fields which are recognized by Prisma before passing it to query methods.

Here's the official Feature Request: Don't throw error when passing object with additional fields which discusses allowing arbitrary fields to prisma.

Related