{"id":15192442,"url":"https://github.com/blackcoder56/graphqlapi_-_django_connection","last_synced_at":"2026-03-03T18:31:18.308Z","repository":{"id":254343664,"uuid":"846252017","full_name":"BlackCoder56/GraphQLAPI_-_Django_connection","owner":"BlackCoder56","description":"Fetching data from django application to Vuejs frontend using graphql api  -\u003e research","archived":false,"fork":false,"pushed_at":"2024-08-24T21:03:35.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T08:48:37.964Z","etag":null,"topics":["api","django","graphql","graphql-schema","python3","vitejs","vuejs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlackCoder56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-22T20:28:37.000Z","updated_at":"2024-08-24T21:03:39.000Z","dependencies_parsed_at":"2024-11-12T11:03:01.605Z","dependency_job_id":"0a0c26f7-9671-4db0-8d60-9a4e7fec4fc1","html_url":"https://github.com/BlackCoder56/GraphQLAPI_-_Django_connection","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"e60f9a914ba3fe8c0bf834ad5779e3bd83b95d64"},"previous_names":["blackcoder56/graphqlapi_-_django_connection"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackCoder56%2FGraphQLAPI_-_Django_connection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackCoder56%2FGraphQLAPI_-_Django_connection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackCoder56%2FGraphQLAPI_-_Django_connection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackCoder56%2FGraphQLAPI_-_Django_connection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackCoder56","download_url":"https://codeload.github.com/BlackCoder56/GraphQLAPI_-_Django_connection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233460994,"owners_count":18679771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","django","graphql","graphql-schema","python3","vitejs","vuejs"],"created_at":"2024-09-27T21:23:41.732Z","updated_at":"2026-03-03T18:31:18.269Z","avatar_url":"https://github.com/BlackCoder56.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### GraphQLAPI_-_Django_connection: Retrieving Data from Django to Vue.js using GraphQL API\n\nNB: You can follow steps in this file to get more knowledge on how to create the project. OR just clone the repository:\n\n    ```bash\n    $ git clone https://github.com/BlackCoder56/GraphQLAPI_-_Django_connection.git\n\n## Features\n- Django\n- Vue.js\n- GraphQL API\n- GraphiQL\n\n- Create, read, update, and delete operations for entries[employess], cities, and titles.\n- Filtering and querying using GraphQL.\n- Mutations for managing employees, cities, and titles.\n- Django integration with GraphQL using `graphene` and `graphene-django`.\n\n\n---\n\n## Step 1: Create Project Root Directory\n**Preparing project directories**\n##    1. Create the project root/main directory:    \n\n       ```bash       \n       $ mkdir \u003cdirName\u003e\n\n##    2. Enter the root project directory:\n\n       ```bash       \n       $ cd \u003cdirName\u003e\n\n##    3. Create frontend and backend directories:\n\n       ```bash      \n        $ mkdir frontend backend\n\n##  Step 2: Setting up the Backend\n**Creating the Django Project:**\n            - First navigate to the backend folder;\n\n       ```bash\n       $ cd backend\n\n##    1. Install Django:\n\n       ```bash     \n       $ pip install django\n\n##    2. Create a virtual environment:\n\n        ```bash\n        $ python3 -m venv env##\n\n##    3. Activate the virtual environment:\n\n       ```bash\n       $ source env/bin/activate\n\n##    4. Create the Django project:\n\n       ```bash\n       $ django-admin startproject \u003cprojectName\u003e .\n\n##    5. Create a Django app (example: test):\n       \n       ```bash\n       $ python manage.py startapp \u003cappName\u003e\n\n       ## add app in installed apps in settings.py file\n\n       INSTALLED_APPS = [\n           …\n           ‘\u003cappName\u003e’,\n       ]\n       \n##    7. Define models in models.py and run migrations:\n       \n       ```bash\n       $ python manage.py makemigrations\n       $ python manage.py migrate\n\n##    8. Update admin.py to register models and create a superuser:\n\n       ```bash\n       $ python manage.py createsuperuser\n\n##    9. Run the server and log in as an admin to create some values:\n\n       ```bash\n       $ python manage.py runserver\n\n##Step 3: Configuring the GraphQL API\n\n##    1. Install necessary packages:\n\n       ```bash       \n       $ pip install graphene-django\n       $ pip install django-filter\n\n##    2. Update settings.py:##\n##        ◦ Add 'graphene_django' to INSTALLED_APPS.\n\n       INSTALLED_APPS = [\n          …\n          'graphene_django',\n          ‘\u003cappName\u003e’,\n       ]\n\n##        ◦ Add the following in settings.py file to configure Graphene:\n         \n          GRAPHENE = {\n              'SCHEMA': '\u003cprojectName\u003e.schema.schema',}\n\n##    3. Create schema.py files:\n##        ◦ In the app directory (e.g., test/schema.py), define your schema.\n##        ◦ In the project directory, create schema.py to tie all app schemas together.\n\n##    4. Update urls.py in the project directory to include GraphQL IDE:\n       \n##       from django.urls import path\n##       from graphene_django.views import GraphQLView\n##       from django.views.decorators.csrf import csrf_exempt\n       \n       urlpatterns = [\n           path('graphql/', csrf_exempt(GraphQLView.as_view(graphiql=True))),\n       ]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackcoder56%2Fgraphqlapi_-_django_connection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackcoder56%2Fgraphqlapi_-_django_connection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackcoder56%2Fgraphqlapi_-_django_connection/lists"}