Gorodov Maksim
06/28/2018, 11:57 AMconst token = jwt.sign(
{
data: {
service: 'karma-api@' + process.env.NODE_ENV,
},
},
config.PRISMA_SECRET,
);
then how should I use it? somewhere here?
const server = new GraphQLServer({
typeDefs: 'src/schema.graphql',
resolvers,
context: req => ({
...req,
prisma: new Prisma({
typeDefs: 'src/generated/prisma.graphql',
endpoint: config.PRISMA_ENDPOINT,
}),
}),
});
nilan
06/28/2018, 11:58 AMprisma-binding
. You can pass in the secret
directly, as seen here: https://github.com/graphql-boilerplates/node-graphql-server/blob/master/advanced/src/index.js#L9Gorodov Maksim
06/28/2018, 12:06 PM