anyone know how to solve this issue: No cluster se...
# orm-help
i
anyone know how to solve this issue: No cluster set. Please set the “cluster” property in your prisma.yml. i’m seeing this error when i try to run: graphql get-schema -p prisma (more info in thread)
i’m having a lot of issues while trying to create both a dev and prod environment.
another issues i’m having is how you use an environment variable in the prisma.yml file
endpoint: ${env:PRISMA_ENDPOINT} isn’t working when i try to use prisma token
h
Hi, Can you please paste the cluster error, also you can generate the graphql schema using the prisma cli only for the second one make sure you have the .env file in the same directory or pass in the
-e
flag
i
Here’s the full text:
graphql get-schema -p prisma ⠸ [ “[WARNING] in prisma/prisma.yml: A valid environment variable to satisfy the declaration ‘env:PRISMA_ENDPOINT’ could not be found.” ] [ “[WARNING] in prisma/prisma.yml: A valid environment variable to satisfy the declaration ‘env:PRISMA_SECRET’ could not be found.” ] ✖️ No cluster set. Please set the “cluster” property in your prisma.yml
am i running the wrong command for the schema?
h
ok the main cause of the error here is the fact that you are not correctly passing in the environment variable
I think you can generate the schema by using prisma cli only
can you tell the cli version you are using(prisma -v) ?
i
1.26.3
h
ok, then add this to the prisma.yml file
Copy code
generate:
  - generator: graphql-schema
    output: ./generate/prisma-schema
you can change the output path
and then run
prisma generate
i
awesome
that seems to have fixed that issue when i run that command with the -e flag pointing to the dev.env