Anyone had any luck using environment variables (p...
# prisma-whats-new
Anyone had any luck using environment variables (perhaps with the
package) in the graphcool-framework v11.5? It seems to have been implemented in Prisma, but can’t get it to work in GCF, and the issues/docs are somewhat confusing and mixing the two up 🙂
@halborg I've been using direnv with the framework
How? I have dotenv 5.0.0, and a
and a
file in the root of my project. One of the values are
, and I try deploying by doing
graphcool deploy --env-file
. This gives me an error saying
A valid environment variable to satisfy the declaration 'env:AUTH_TOKEN_ENDPOINT' could not be found.
- can you spot my mistake @max ?
@halborg I don't use dotenv.....I use direnv (). This is how I reference env vars in the graphcool.yml file: MAILGUN_API_KEY: ${env:MAILGUN_API_KEY}
Oh, I see - thanks! 🙂 I’ll give it a go
But using direnv, @max, how do you hold variables for prod and dev? As I understand it, it only allows for a single file?
And what args do you use when deploying? Can’t seem to find anything about it
I've been using
eval "$(direnv export bash)"
with macOS. I only have one .envrc not sure how to help you with dev v.s. prod