Shopping application with django and django-graphene
2 min readSep 3, 2020
This project is developed with python3 and django rest framework (DRF) and the code and docker images is HERE.
Develop the Model
First of all for the shopping app this model is developed.
This model is used for creating schema, the whole process of creating django graphql is described here.
The schema of this application could be found here.
Building with Docker
docker-compose up --build
adding dummy data with this command:
python manage.py loadtestdata buy.Orders:3000 buy.Products:2000 -d
Query all data
In localhost:8000/graphql:
This command will results every dummy data into database.
Posting order data with mutation
In localhost:8000/graphql:
By this command this random order data will be saved into database.
Posting product data with mutation
In localhost:8000/graphql:
By this command this random product data will be saved into database.