A Modern Transition from REST to GraphQL
🔥 Reimagining Dokoon-NextDRF with GraphQL Power
This project evolves from Dokoon-NextDRF (Next.js + Django REST Framework) to demonstrate:
✨ GraphQL API implementation as a modern alternative to REST
✨ HTTP-Only Cookie Authentication for enhanced security
✨ Focused on backend API architecture over UI polish
Note: While the original project emphasized full-stack features, this version prioritizes GraphQL implementation patterns and secure auth flows.
Feature | Description |
---|---|
📡 GraphQL API | Complete replacement of DRF endpoints with GraphQL queries/mutations |
🔒 Auth Strategy | JWT authentication via HTTP-Only cookies (No localStorage!) |
⚡ Performance | Optimized data fetching with GraphQL's query flexibility |
🧩 Modular Design | Clean separation between Django models and GraphQL resolvers |
1. Clone Repository
git clone https://github.com/idarbandi/Dokoon-NextJS-GraphQL.git
cd Dokoon-NextJS-GraphQL
2. Frontend Setup
cd frontend
npm install
npm run dev
3. Backend Setup
cd backend
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
pip install -r requirements.txt
python manage.py runserver
- Eliminated Over-fetching: Clients request exact data needs
- Single Endpoint:
/graphql
replaces multiple REST endpoints - Strong Typing: Schema-first development with Graphene-Django
- Frontend Flexibility: Next.js seamlessly consumes GraphQL API
PRs welcome! Please follow:
- Create feature branch:
git checkout -b feat/your-feature
- Maintain consistent GraphQL schema design
- Test auth flows with HTTP-only cookies
- Update documentation accordingly
Crafted with ❤️ by idarbandi
📫 Contact: darbandidr99@gmail.com
💼 Connect: LinkedIn Profile
🐛 Report Issues: GitHub Issues