Skip to content

Example GraphQL application with Flask, pypy/python3 and MongoDB

License

Notifications You must be signed in to change notification settings

tonykuo222/flask-graphql-example

 
 

Repository files navigation

Example of small GraphQL app with Flask + Python3/PyPy3 + MongoDb

Build Status Code Issues

Quick start with docker

docker-compose build
docker-compose up

Optionally populate database

docker-compose run web pypy3 manage.py init

And then open http://localhost:5000/ui

Demo screen

Development workflow

Create a virtual environment with Python3 or PyPy3

Make sure you have running MongoDb instance either on localhost or

export DB_PORT_27017_TCP_ADDR='ip address'

Likewise you can use containerized Mongo but you will need to setup env variables as well

docker-compose build
docker-compose up db

Then you can install deps and run the python app

make req
python api.py

Miscellaneous

Auto format your code

make format

Nosetests with reload

make watch

About

Example GraphQL application with Flask, pypy/python3 and MongoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.9%
  • JavaScript 16.6%
  • HTML 4.6%
  • Makefile 2.1%
  • Other 0.8%