Configure plural names of models #48
Comments
Hello, I'll add that it needs fixing, "Todo" becomes "Todoes" :). |
This is also important for localized model names |
We're using GraphCMS which uses Prisma and this looks really bad in the interface. "WhatWeDoes", "HomepageIntroes" etc. |
I ran into this today with a model Is there a third party inflection library being used? |
I ran into this today - model |
TBH I don't see why an external pluralisation library isn't being used. No doubt these problems have been solved countless times already. https://yarnpkg.com/en/package/pluralize, for example, with 17.8m downloads in the last 30 days:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
Same problem here. Postgraphile is a nice reference on how to solve this issue. |
Has this been solved? If not, which library or mechanism is being used by prisma to pluralize? |
Any updates? |
They know the issue and acknowledge most of the code in the wild is untested. Amending this issue would render a breaking change. What I would recommend is having your own set of model names overwriting the ones Prisma creates. |
Hey people, any updates on this? |
In some cases it might be needed to provide a custom plural name of a model.
Here is how it could be configured in the datamodel:
The text was updated successfully, but these errors were encountered: