Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug][admin] Admin table not working with no capitalized models #271

Open
Cauen opened this issue Jun 23, 2022 · 2 comments
Open

[bug][admin] Admin table not working with no capitalized models #271

Cauen opened this issue Jun 23, 2022 · 2 comments

Comments

@Cauen
Copy link
Contributor

Cauen commented Jun 23, 2022

Once models in resolver names are Capitalized on Nexus Generator, we need to Capitalize in requests of Prisma Table

NOTE: This component use 3 queries (findUnique, findMany, findManyCount) and 3 mutations (createOne, updateOne, deleteOne) be sure to add them in your backend by using our CLI pal generate

Now, models are creating this resolvers

Model Resolver Request from AdminTable Ok?
commom_user createOneCommom_user createOnecommom_user
CommomUser createOneCommomUser createOneCommomUser

Ive fixed and sending a PR

@AhmedElywa
Copy link
Collaborator

Prisma recommends to type in camel case can you use pal schema camel-case to update your schema with camel case

@Cauen
Copy link
Contributor Author

Cauen commented Jun 23, 2022

Prisma recommends to type in camel case can you use pal schema camel-case to update your schema with camel case

A way to automatically convert to PascalCase is very good
But I believe that because it is not a mandatory step before use generator, and the Nexus resolvers is always with capitalized model names, it is still a bug.
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants