Prisma 1 Forum

New version prisma issue while generating graphql schema

  • old version prisma allowing output path without adding filename but new version throwing error, error below:

▸ Error: output for generator graphql-schema should be a .graphql-file.
▸ Please change the output property for this generator in prisma.yml

working script with old version but not with new version:

  ` - generator: graphql-schema
     output: ./generated/prisma`

working script with new version but creating path issue with old version:

  `- generator: graphql-schema
     output: ./generated/prisma.graphql`
  • partially working solution (also suggested in slack channel) is to add file name with graphql extension.This is working fine with new version but old version creating directory with file name and then creating graphql file. This is becoming issue while importing schemas while working on old version


This is a breaking change as mentioned in the release notes. Please use the same version of cli everywhere. Possibly match it with the prisma server version

Here are the release notes:

sure will follow
Thank you