Walk Trough of the blog post: How to build GraphQL API with Django – 7 Steps by Ijharul Islam
--- Application Structure modified by @kamranhossain([email protected])
Serving Graphql APIs with Django application
- Python 3+
- Django
- graphene_django
To run the app on your local machine, you need Python 3+, installed on your computer. If you using pipenv than follow 2nd 1 to 7 steps
- Clone the repo from git and got to repo folder
git clone https://github.com/kamranhossain/morning_blog.git
cd morning_blog
-
Create and activate virtualenv:
python3 -m venv venv . venv/bin/activate
-
Read requirments file:
pip install -r requirments.txt
-
Migrate
shell python manage.py migrate
-
Load data from fixtures
python manage.py loaddata blogs
-
Run server
python manage.py runserver
Go to http://127.0.0.1:8000/ in web browser
-
Test graphql-queries http://127.0.0.1:8000/graphql