This repository contains the code samples to build your own GraphQL API using the Django web framework and the Graphene library for Python. It is intended to be accompanied by a presentation (originally prepared for DjangoCon US 2018).
We assume you're comfortable with Python and Django. You should also be familiar with the usage of pip and how to install packages in your Python environment.
The code and all directions were written for Python 3. It may work with Python 2 but you may find unexpected errors.
# Create a Python 3 virtual environment, then...
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py loaddata demo.json
python manage.py runserver
- Graphene Python documentation
- Graphene Django documentation
- Graphene Django examples
- Migrating to graphene-django 2.0
- Use DjangoObjectType (or something like it) as an Input class?