/graphql-vs-rest

This is a Django Tutorial that contains a example with REST API and GraphQL.

Primary LanguagePython

API Tutorial

This is a Django Tutorial that contains a example with REST API and GraphQL.

References

The data for the tutorial is obtained from https://github.com/graphql-python/swapi-graphene

Configuration

Please follow these steps:

  1. Clone the repository

  2. Checkout the branch depending of your need for the tutorial

  3. Install pip and virtualenv

  4. Install project dependencies

     $ pip install -r requirements.txt
    
  5. Run docker-compose

     $ docker-compose up
    
  6. Initialize your database

     $ python manage.py migrate
    
  7. Create superuser account

     $ python manage.py createsuperuser
    
  8. Run your server

     $ python manage.py runserver 0.0.0.0:8000
    
  9. Run your tests

     $ python manage.py test