Successfully reported this slideshow.
Your SlideShare is downloading. ×

_Django meets GraphQL.pdf

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Django Article V0
Django Article V0
Loading in …3
×

Check these out next

1 of 3 Ad

More Related Content

Similar to _Django meets GraphQL.pdf (20)

Recently uploaded (20)

Advertisement

_Django meets GraphQL.pdf

  1. 1. Django meets GraphQL: a powerful combination ➢ Assumption: ○ I’m assuming that y’all have some basic knowledge about Graphql & Django. ○ If not then kindly go through below link: ○ Graphql: https://graphql.org/learn/ ○ Django:https://www.djangoproject.com/ ➢ Introduction ○ GraphQL is an open-source query language used to communicate data between the client and the server. ○ In this document our focus will be on integrating a GraphQL API into a Django development project and effectively using it to query data as per our requirements. ALWAYS FIRST STEP IS TO Set environment:
  2. 2. ➢ Create Virtual Environment ○ Enter the following command to create a new virtual environment with the name "myenv" (you can replace "myenv" with a your environment name): ● python -m venv myenv ○ Once the virtual environment is created, you can activate it by entering the following command. ● source myenv/bin/activate ➢ Installation [ Django & Graphene-django ] ○ First install django ● pip install django ○ Then install graphene-django library ● pip install graphene-django ➢ Check requirements & freeze it into relevant file. ○ Run command to freeze your requirements.txt file:- ● pip freeze > requirements.txt ○ It will create requirements.txt file with all installed packages directory ○ Your requirements.txt look like as below: ➢ Create django project and relevant app in your project and configure with settings.py
  3. 3. ➢ Create models in model.py for the project in your app. Conclusion: In conclusion, Django and GraphQL are a powerful combination that can provide developers with a flexible and efficient way to build APIs. While Django provides a robust and scalable backend framework, GraphQL offers a query language that allows for more efficient and precise data retrieval. Overall, the combination of Django and GraphQL offers a great solution for developers who want to build robust and efficient APIs. By leveraging the strengths of both technologies, developers can create applications that are not only scalable and maintainable but also provide a great user experience. Originally Published by Django meets GraphQL

×