Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 1.23 KB

README.md

File metadata and controls

79 lines (63 loc) · 1.23 KB

flaskql-playground

MongoDB+Flask+Graphene Docker Playground

Getting Started

After cloning this repository, you'll want to build and tag the Docker images:

$ docker-compose build

Starting the Stack

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!

Stopping the Stack

To stop the stack, run:

$ docker-compose down

Example Query

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
            }
          }
        }
      }
    }
  }
}

Acknowledgements

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?