Docker GraphQL Environment Variables

Hey

I’m trying to setup GraphQL on a staging server I have using a Docker template, but having trouble setting it up. Is there any Environment Variables I need to use, or any better explanation on exactly how this works.

I’m the author of the Flutter Parse SDK and would be keen to add this feature as soon as to the SDK.

Thanks in advance!

I will add some documentation in the following few days about how to run it in Docker. But basically you can send the GraphQL options when running the container. You can do something like this:

docker run --name my-parse-server --link my-mongo:mongo -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test --mountGraphQL --mountPlayground

Thanks Davi.

I might hold out for the documentation! I am a beginner when it comes to GraphQL.

Excited to see what it can do!

We are still working to improve the GraphQL docs but you can already find some information in the Parse Server Repo and in the Parse GraphQL Guide. Let me know if you have any feedback or need any help.

The GraphQL Guide has now been updated thanks to @davimacedo with extra setup instructions.

Great work on the documentation. I’m up and running.

I didn’t realise how simple it was to setup, I followed Davi’s instructions and added run parameters, that was all that was needed! Great work.

Another quick question, I understand that playground shouldn’t be used in production, but is there anyway to ensure that masterKeys are redacted from headers? Or would that be too difficult? I might just have to change my key in development and production otherwise?

2 Likes

I’m glad GraphQL is working for you! :smile:

In order to change your headers, in GrpahQL Playground, look at the bottom left side, there is an option called http headers. You will see there the app id and master key that were automatically added by convenience. You can change these headers to whatever you want.