Skip to content

kamranhossain/morning_blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build GraphQL API with Django and Graphene-Django

Walk Trough of the blog post: How to build GraphQL API with Django – 7 Steps by Ijharul Islam

--- Application Structure modified by @kamranhossain(kamran.hossain227@gmail.com)

Serving Graphql APIs with Django application

Requirements

  1. Python 3+
  2. Django
  3. graphene_django

Installation on Development Machine

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

  1. Clone the repo from git and got to repo folder
git clone https://github.com/kamranhossain/morning_blog.git
cd morning_blog
  1. Create and activate virtualenv:

    python3 -m venv venv
    . venv/bin/activate
    
  2. Read requirments file:

    pip install -r requirments.txt

  3. Migrate shell python manage.py migrate

  4. Load data from fixtures

    python manage.py loaddata blogs
  5. Run server

    python manage.py runserver

    Go to http://127.0.0.1:8000/ in web browser

  6. Test graphql-queries http://127.0.0.1:8000/graphql