graphql-boilerplates/node-graphql-server

PRISMA_ENDPOINT incorrect - url has duplicate service name

nhuesmann opened this issue · 3 comments

PRISMA_ENDPOINT in .env is incorrectly set when using node-advanced boilerplate.

Steps to reproduce:

  1. prisma init <my-project>
  2. Setup: GraphQL server/fullstack boilerplate (recommended)
  3. Boilerplate: node-advanced
  4. Cluster: my-name-022z35/prisma-us1
  5. Endpoint: https://us1.prisma.sh/my-name-022z35/my-project/dev

.env contents are as follows

PRISMA_STAGE="dev"
PRISMA_ENDPOINT="https://us1.prisma.sh/my-name-022z35/my-project/my-project"
PRISMA_CLUSTER="my-name-022z35/prisma-us1"
PRISMA_SECRET="mysecret123"
APP_SECRET="jwtsecret123"

PRISMA_ENDPOINT has a duplicate service name. Full endpoint should be:
https://us1.prisma.sh/my-name-022z35/my-project/dev

Instantiation of Prisma object in index.js should have the endpoint property as:

`${process.env.PRISMA_ENDPOINT}/${process.env.PRISMA_STAGE}`

Thanks, this is caused by this error: https://github.com/graphcool/prisma/issues/2230.

This is now fixed, thanks for the heads up @nhuesmann 🙏

@marktani Awesome, thanks!