I'm trying to run my GraphQL Yoga server but it's complaining about a syntax error in my db.js
file:
GraphQLError: Syntax Error: Cannot parse the unexpected character ".".
const { Prisma } = require("prisma-binding");
const db = new Prisma({
typeDefs: './generated/prisma-client/prisma-schema.js',
endpoint: process.env.PRISMA_ENDPOINT,
secret: process.env.PRISMA_SECRET,
debug: false
});
module.exports = db;
The line it doesn't like is typeDefs
. When I remove the dot and just say "generated/prisma-client/prisma-schema.js"
it can't parse the unexpected character "generated".
Any ideas what's going on?
Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.