NB: You can follow steps in this file to get more knowledge on how to create the project. OR just clone the repository:
```bash
$ git clone https://github.com/BlackCoder56/GraphQLAPI_-_Django_connection.git
-
Django
-
Vue.js
-
GraphQL API
-
GraphiQL
-
Create, read, update, and delete operations for entries[employess], cities, and titles.
-
Filtering and querying using GraphQL.
-
Mutations for managing employees, cities, and titles.
-
Django integration with GraphQL using
graphene
andgraphene-django
.
Preparing project directories
```bash
$ mkdir <dirName>
```bash
$ cd <dirName>
```bash
$ mkdir frontend backend
Creating the Django Project: - First navigate to the backend folder;
```bash
$ cd backend
```bash
$ pip install django
```bash
$ python3 -m venv env##
```bash
$ source env/bin/activate
```bash
$ django-admin startproject <projectName> .
```bash
$ python manage.py startapp <appName>
## add app in installed apps in settings.py file
INSTALLED_APPS = [
…
‘<appName>’,
]
```bash
$ python manage.py makemigrations
$ python manage.py migrate
```bash
$ python manage.py createsuperuser
```bash
$ python manage.py runserver
##Step 3: Configuring the GraphQL API
```bash
$ pip install graphene-django
$ pip install django-filter
INSTALLED_APPS = [
…
'graphene_django',
‘<appName>’,
]
GRAPHENE = {
'SCHEMA': '<projectName>.schema.schema',}
urlpatterns = [
path('graphql/', csrf_exempt(GraphQLView.as_view(graphiql=True))),
]