/graphql-cookbook

Project files for the tutorial "Build a GraphQL API powered by Django".

Primary LanguagePython

Build a GraphQL API powered by Django

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).

Requirements

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.

Quickstart

# 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

Useful links

General GraphQL

Python / Django specific

Miscellaneous

Client-side