paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
684 stars 54 forks source link

The directive `@map` can not be used on relation fields #134

Closed bkniffler closed 3 years ago

bkniffler commented 3 years ago

I've just used pal schema camel-case and I got this error during my next prisma generate call:

Bildschirmfoto 2020-09-30 um 08 22 02

Is there a way to handle relations properly, in a way that prisma accepts?

AhmedElywa commented 3 years ago

Thanks for reporting this issue. I will skip the relation fields from this convert

AhmedElywa commented 3 years ago

@bkniffler can you please upgrade to v2.0.2 and test again?

bkniffler commented 3 years ago

I'm sorry, I was just evaluating prisma including paljs. I've now gotten rid of prisma, I'll not be able to try for now. But good job on fixing so fast :)

jjangga0214 commented 2 years ago

@AhmedElywa Why don't you just change the case without @map?

@map is not allowed to relation because the name of the relation is not from the database. It's free and how to name it is up to us.

We do not need @map, but we just can name it camelcase.