Open NextStepGuru opened 1 year ago
For files inside the objects
folder, there's nothing we can do about it. The reason for that being the info Prisma provides us with does not mention to which model this inputType belongs to. The objects
folder is actually for the inputObjectTypes
that get generated by Prisma.
What we can do though, is break the generated the schemas inside generated/schemas
into multiple folders based on model name.
I'm not sure how many files you get generated in the objects
folder, so tell me if this solves your issue or not.
Problem
I am using the prisma-joi-generator to create Joi validator objects automatically and import them into my Koa.js project. I then use the Joi object to validate my API inputs. All of this works great. However, when I deploy the code to Google App Engine to test my API. Google throws an error stating too many files in a single directory. I have over 70 tables in my database and this generator creates 1300+ files.
Suggested solution
Break up the generated files by Table-name sub-directory. For example, if the table name is
Post
then the sub-directory would be ./generated/post/Post*.ts