/GSDC-NITK-CRUD-API

A Django based CRUD API using GraphQL to manage employees in an organization.

Primary LanguagePython

WEC NITK GSDC Task ID: CRUD API

A Django based CRUD API to manage employees in an organization.
It uses GraphQL to communicate between the frontend and the backend.


Screenshots

Query - All Employees

Query - All Employees

Query - Get Single Employee

Query - Get Single Employee

Query - All Department Employees

Query - All Department Employees

Mutation - Create Employee

Mutation - Create Employee

Mutation - Update Employee

Mutation - Update Employee

Mutation - Delete Employee

Mutation - Delete Employee


Setting up the project:


Installing and using a Virtual Environment

pip install virtualenvwrapper-win
mkvirtualenv test   test = name of virtual env


Install required packages:

pip install -r requirements.txt


To run project:

After ensuring that we are in a virtual environment (If not, use workon test)

python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Visit development server http://127.0.0.1:8000/graphql

Create Super user:

python manage.py createsuperuser

Enter desired credentials


Admin at http://127.0.0.1:8000/admin

Implemented Features

  • Query Employee Details
  • Query based on department
  • Create Update and Delete Employee Details
  • Uses GraphQL

Tech Stack

Python

References:

Django's Official Documentation
Python Graphene Documentation
Articles - 1, 2, 3, 4 and Tutorials