Jim
07/10/2018, 2:31 PMconst server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
context: req => ({
...req,
db: new Prisma({
typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
debug: true, // log all GraphQL queries & mutations sent to the Prisma API
// secret: process.env.PRISMA_SECRET, // only needed if specified in `database/prisma.yml` (value set in `.env`)
}),
}),
});
nilan
07/10/2018, 2:32 PM// secret: process.env.PRISMA_SECRET, // only needed if specified inyou don't need to supply the token, but the secret(value set indatabase/prisma.yml
).env
Jim
07/10/2018, 2:33 PM