Open dharmendraboddeda opened 5 months ago
Duplicate of #450?
I have the same issue
CreateMany files are improperly importing the models it seems:
Maybe should be:
I faced same issue and above change solves the issue, at least runtime error is not showing up after this fix.. this needs to be fixed in code where these imports are autogenerated at package level so that when running 'npm install' generates files with this fix when using below code in schema.prisma file:
generator typegraphql {
provider = "typegraphql-prisma"
}
With the findings of the earlier comments, I added this after my prisma generate
step:
find path-of-typegraphql-output/resolvers/outputs -type f -name 'CreateMany*' -exec sed -i 's/\.\.\/outputs\//\.\.\/\.\.\/models\//g' {} \;
Replace path-of-typegraphql-output
with the default ./node_modules/@generated/type-graphql
, or the output
option configured in your prisma schema.
This does the same as what @savager found here: https://github.com/MichalLytek/typegraphql-prisma/issues/454#issuecomment-2159845608
All of my old queries are working, but as I have a read-only database, I can't test the createMany.
Adding this to the package.json seems to be a temporary workaround
"overrides": {
"@prisma/generator-helper": "^5.4.2 <=5.13.0",
"@prisma/internals": "^5.4.2 <=5.13.0"
}
Incorectly generating the rosolvers i have used this same prisma schema at typegraphql-prisma version (0.27.1) but now when use current version 0.27.2 , i am facing the issue generating the resolvers.
To Reproduce
its generating this path
and in this return outputType files this kind of modules are not resolving
but previous version that i have used i didn't get generate this files please resolve my issue
Expected Behavior
See i have used typegraphql-prisma: "0.27.1"
Logs
Environment (please complete the following information):
typegraphql-prisma
version [0.27.2]