MongoDB+Flask+Graphene Docker Playground
After cloning this repository, you'll want to build and tag the Docker images:
$ docker-compose build
To start the stack after having already use it in the past, run:
$ docker-compose up -d
Now, visit http://localhost:5000/graphql and find your running application!
To stop the stack, run:
$ docker-compose down
Here's a sample query you can use:
{
allEmployees {
edges {
node {
id,
name,
department {
id,
name
},
roles {
edges {
node {
id,
name
}
}
},
leader {
id,
name
}
tasks {
edges {
node {
name,
deadline
}
}
}
}
}
}
}
This began as a Dockerized form of the Graphene Flask example found at https://github.com/graphql-python/graphene-mongo/. It required some minor local modifications to make it run, but let's give credit where it's due, shall we?