veksen
06/18/2018, 8:17 PMyarn prisma token
doesn't change anything - both in playground or from my appnilan
06/18/2018, 8:24 PMveksen
06/18/2018, 8:25 PMnilan
06/18/2018, 8:25 PMnilan
06/18/2018, 8:26 PMveksen
06/18/2018, 8:32 PMveksen
06/18/2018, 8:34 PM~/.prisma/config.yml
(I think it's deprecated anyways?)veksen
06/18/2018, 8:35 PMnilan
06/18/2018, 8:40 PMnilan
06/18/2018, 8:41 PMveksen
06/18/2018, 10:45 PMPRISMA_ENDPOINT="<http://localhost:4466>"
PRISMA_SECRET="secret123"
PRISMA_MANAGEMENT_API_SECRET="my-secret"
APP_SECRET="jwtsecret123"
index.js relevant bit
const server = new GraphQLServer({
typeDefs: "src/schema.graphql",
resolvers,
context: req => ({
...req,
db: new Prisma({
fragmentReplacements,
typeDefs: "src/generated/prisma.graphql",
endpoint: process.env.PRISMA_ENDPOINT,
secret: process.env.PRISMA_SECRET,
debug: true,
tracing: true,
cacheControl: true
})
})
});
prisma.yml
endpoint: ${env:PRISMA_ENDPOINT}
secret: ${env:PRISMA_MANAGEMENT_API_SECRET} // tried with PRISMA_SECRET as well
datamodel: datamodel.graphql
hooks:
post-deploy:
- graphql get-schema --project prisma
- graphql prepare
veksen
06/18/2018, 10:47 PM.env
, so rest is all identicalnilan
06/19/2018, 6:45 AMnilan
06/19/2018, 8:04 AMsecret
in prisma.yml
and secret
in the Prisma
constructor in index.js
need to be the samenilan
06/19/2018, 8:04 AMsecret
in prisma.yml
is not enough, you need to deploy to update the secret.