Hi after, deleting the generated folder and regene...
# prisma-whats-new
m
Hi after, deleting the generated folder and regenerating I get the issue
Error: ENOENT: no such file or directory, open 'XXX/src/generated/prisma.graphql'
. This is happening because prisma now names their generated files
database
. I have the following script to work around:
Copy code
#!/bin/bash

set -x

rm -rf src/generated/
prisma deploy
graphql get-schema -p database -o src/generated/prisma.graphql
graphql prepare -p database -o src/generated
rm src/generated/prisma.graphql
cp src/generated/database.graphql src/generated/prisma.graphql
cp src/generated/database.ts src/generated/prisma.ts
However, I think prisma should take this task... Should I open a git issue? is there already one? Or am I missing some config?
j
Hello @Moritz
can you share your
.graphqlconfig.yml
please?
m
Copy code
projects:
  app:
    schemaPath: "src/schema.graphql"
    extensions:
      endpoints:
        default: "<http://localhost:4000>"
  database:
    schemaPath: "src/generated/database.graphql"
    extensions:
      prisma: database/prisma.yml
      prepare-binding:
        output: src/generated/database.ts
        generator: prisma-ts
j
in the
database
project, you just need to change
database.graphql
by
prisma.graphql
(and same thing for the TS file)
m
Ahh ok thanks so its a naming convention thing. Thx! 🙌