Giter Site home page Giter Site logo

Comments (12)

JustasPolis avatar JustasPolis commented on April 30, 2024 8

Hello, I'll add that it needs fixing, "Todo" becomes "Todoes" :).

from prisma1.

jvbianchi avatar jvbianchi commented on April 30, 2024 5

This is also important for localized model names

from prisma1.

dgdosen avatar dgdosen commented on April 30, 2024 2

I ran into this today - model Todo that generates todoes :)

from prisma1.

alistairholt avatar alistairholt commented on April 30, 2024 2

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:

pluralize('Todo') // Todos
pluralize('Person') // People
pluralize('WhatWeDo') // WhatWeDos
pluralize('HomepageIntro') // HomepageIntros

from prisma1.

alistairholt avatar alistairholt commented on April 30, 2024

We're using GraphCMS which uses Prisma and this looks really bad in the interface. "WhatWeDoes", "HomepageIntroes" etc.

from prisma1.

rcy avatar rcy commented on April 30, 2024

I ran into this today with a model Person that generates the query persons, but I would prefer people.

Is there a third party inflection library being used?

from prisma1.

stale avatar stale commented on April 30, 2024

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.

from prisma1.

cassiopagnoncelli avatar cassiopagnoncelli commented on April 30, 2024

Same problem here.

Postgraphile is a nice reference on how to solve this issue.

from prisma1.

biels avatar biels commented on April 30, 2024

Has this been solved? If not, which library or mechanism is being used by prisma to pluralize?

from prisma1.

pbassut avatar pbassut commented on April 30, 2024

Any updates?

from prisma1.

cassiopagnoncelli avatar cassiopagnoncelli commented on April 30, 2024

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.

from prisma1.

vidz1979 avatar vidz1979 commented on April 30, 2024

Hey people, any updates on this?

from prisma1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.