Can I set Dgraph.Authorization key using ENV variables?

Can I set Dgraph.Authorization key using ENV variables?

Currently I could use string replacement, but that’s obviously not very handy.

Where and how are you transmitting your graphql schema to dgraph? CLI, Slash, GraphQL admin endpoint? That will help clarify if and how env variables may or may not be possible.

I use CLI.

Also the same question goes for endpoint IPs in @custom directives.

So I guess the question needs to be rephrased:

How to use environment variables in dgraph graphql schema?

“classic” approach:
envsubst < schema.graphql

ENV variables are not supported in the GraphQL schema yet but would be good to have. I don’t have an ETA for this yet though.

No worries, I’m fine using envsubst.