Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Django
Django

7.7K
5.5K
+ 1
2.8K
GraphQL
GraphQL

4.8K
4.1K
+ 1
257
Add tool

Django vs GraphQL: What are the differences?

What is Django? The Web framework for perfectionists with deadlines. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

What is GraphQL? A data query language and runtime. GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.

Django can be classified as a tool in the "Frameworks (Full Stack)" category, while GraphQL is grouped under "Query Languages".

"Rapid development", "Open source" and "Great community" are the key factors why developers consider Django; whereas "Schemas defined by the requests made by the user", "Will replace RESTful interfaces" and "The future of API's" are the primary reasons why GraphQL is favored.

Django and GraphQL are both open source tools. Django with 42.6K GitHub stars and 18.3K forks on GitHub appears to be more popular than GraphQL with 11.7K GitHub stars and 753 GitHub forks.

Instagram, Pinterest, and Udemy are some of the popular companies that use Django, whereas GraphQL is used by Facebook, Instagram, and Twitter. Django has a broader approval, being mentioned in 993 company stacks & 914 developers stacks; compared to GraphQL, which is listed in 561 company stacks and 750 developer stacks.

What is Django?

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

What is GraphQL?

GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Django?
Why do developers choose GraphQL?

Sign up to add, upvote and see more prosMake informed product decisions

Sign up to add, upvote and see more consMake informed product decisions

What companies use Django?
What companies use GraphQL?

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Django?
What tools integrate with GraphQL?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Django and GraphQL?
Flask
Flask is intended for getting started very quickly and was developed with best intentions in mind.
Node.js
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Rails
Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.
Laravel
It is a web application framework with expressive, elegant syntax. It attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.
PHP
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
See all alternatives
Decisions about Django and GraphQL
HAProxy
HAProxy
Varnish
Varnish
Tornado
Tornado
Django
Django
Redis
Redis
RabbitMQ
RabbitMQ
nginx
nginx
Memcached
Memcached
MySQL
MySQL
Python
Python
Node.js
Node.js

Around the time of their Series A, Pinterest’s stack included Python and Django, with Tornado and Node.js as web servers. Memcached / Membase and Redis handled caching, with RabbitMQ handling queueing. Nginx, HAproxy and Varnish managed static-delivery and load-balancing, with persistent data storage handled by MySQL.

See more
Django
Django
React
React
Python
Python
Node.js
Node.js

In late 2015, following the Series G, Pinterest began migrating their web experience to React, primarily because they “found React rendered faster than our previous template engine, had fewer obstacles to iterating on features and had a large developer community.”

The legacy setup consistent of Django, Python and Jinja on the backend, with Nunjucks handling template rendering on the client side. They wanted to move to React for handling template rendering across the board, but if they “switched the client-side rendering engine from Nunjucks to React, [they’d] also have to switch [their] server-side rendering, so they could share the same template syntax.”

They decided on an iterative approach that consolidated a single template rendering engine between client and server, since “If the server could interpret JavaScript, and use Nunjucks to render templates and share our client-side code, we could then move forward with an iterative migration to React.” The team decided to stand up a Node process, behind Nginx, and interpret JavaScript server-side.

Now, when a user agent makes a request, a latent module render requests that it needs data via an API call. Concurrently, a separate network call is made “to a co-located Node process to render the template as far as it can go with the data that it has.”

Node then responds with rendered templates, and along with a “holes” array to indicate what data was still needed to complete the render. Finally, the Python webapp makes an API call to fetch the remaining data, and each module is sent back to Node as completely independent module requests/in parallel/.

With this framework in place, Pinterest developers are in the process of replacing Nunjucks code with React components throughout the codebase.

See more
Collins  Ogbuzuru
Collins Ogbuzuru
Front-end dev at One shirt · | 8 upvotes · 12.2K views
AWS Lambda
AWS Lambda
Prisma
Prisma
GraphQL
GraphQL

We are starting to build one shirt data logic, structure and as an online clothing store we believe good ux and ui is a goal to drive a lot of click through. The problem is, how do we fetch data and how do we abstract the gap between the Front-end devs and backend-devs as we are just two in the technical unit. We decided to go for GraphQL as our application-layer tool and Prisma for our database-layer abstracter.

Reasons :

GraphQL :

  1. GraphQL makes fetching of data less painful and organised.

  2. GraphQL gives you 100% assurance on data you getting back as opposed to the Rest design .

  3. GraphQL comes with a bunch of real-time functionality in form of. subscriptions and finally because we are using React (GraphQL is not React demanding, it's doesn't require a specific framework, language or tool, but it definitely makes react apps fly )

Prisma :

  1. Writing revolvers can be fun, but imagine writing revolvers nested deep down, curry braces flying around. This is sure a welcome note to bugs and as a small team we need to focus more on what that matters more. Prisma generates this necessary CRUD resolves, mutations and subscription out of the box.

  2. We don't really have much budget at the moment so we are going to run our logic in a scalable cheap and cost effective cloud environment. Oh! It's AWS Lambda and deploying our schema to Lambda is our best bet to minimize cost and same time scale.

We are still at development stage and I believe, working on this start up will increase my dev knowledge. Off for Lunch :)

See more
Zarema Khalilova
Zarema Khalilova
Frontend Team Lead at Uploadcare · | 8 upvotes · 45.6K views
atUploadcareUploadcare
Netlify
Netlify
Gatsby
Gatsby
React
React
Node.js
Node.js
Django
Django
#StaticWebHosting
#StaticSiteGenerators
#Frontend

Since 2011 our frontend was in Django monolith. However, in 2016 we decide to separate #Frontend from Django for independent development and created the custom isomorphic app based on Node.js and React. Now we realized that not need all abilities of the server, and it is sufficient to generate a static site. Gatsby is suitable for our purposes. We can generate HTML from markdown and React views very simply. So, we are updating our frontend to Gatsby now, and maybe we will use Netlify for deployment soon. This will speed up the delivery of new features to production.

#StaticSiteGenerators #StaticWebHosting

See more
Tim Abbott
Tim Abbott
Founder at Zulip · | 7 upvotes · 25.7K views
atZulipZulip
Django REST framework
Django REST framework
Django
Django

Zulip has been powered by Django since the very early days of its development with Django 1.4, back in 2012. As a reasonably mature web application with significant scale, we're at the stage in many companies' development where one starts to rip out more and more of the web framework to optimize things or just make them work the way we want. (E.g. while I was at Dropbox in early 2016, we discovered we only had about 600 lines of code left from the original Pylons framework that actually ran).

One of the things that has been really fantastic about Django is that we're still happily using it for the vast majority of code in the project, and every time Django comes out with a new release, I read the changelog and get excited about several improvements that actually make my life better. While Django has made some design decisions that I don't agree with (e.g. I'm not a fan of Django REST framework, and think it makes life more difficult), Django also makes it easy to do your own thing, which we've done to great effect (see the linked article for details on our has_request_variables framework).

Overall I think we've gotten a ton of value out of Python and Django and would recommend it to anyone starting a new full-featured web application project today.

See more
Divine Bawa
Divine Bawa
at PayHub Ghana Limited · | 13 upvotes · 98K views
Apollo
Apollo
Next.js
Next.js
styled-components
styled-components
React
React
graphql-yoga
graphql-yoga
Prisma
Prisma
MySQL
MySQL
GraphQL
GraphQL
Node.js
Node.js

I just finished a web app meant for a business that offers training programs for certain professional courses. I chose this stack to test out my skills in graphql and react. I used Node.js , GraphQL , MySQL for the #Backend utilizing Prisma as a database interface for MySQL to provide CRUD APIs and graphql-yoga as a server. For the #frontend I chose React, styled-components for styling, Next.js for routing and SSR and Apollo for data management. I really liked the outcome and I will definitely use this stack in future projects.

See more
Johnny Bell
Johnny Bell
Senior Software Engineer at StackShare · | 9 upvotes · 115.6K views
atStackShareStackShare
Apollo
Apollo
GraphQL
GraphQL
MobX
MobX
JavaScript
JavaScript
ES6
ES6
React
React
jQuery
jQuery
#Context
#Hooks🎣

We are always building new features and replacing old code at StackShare. Lately we have been building out new features for the frontend, and removing a lot of old jQuery code (sorry jQuery but it's time to go).

We've mainly been using React, ES6 and JavaScript on the frontend to build out the components, and we've been slowly removing some legacy MobX and using GraphQL and Apollo for our state management, if we need to control state further than GraphQL and Apollo allows us to we use just plain React with #context , or the new fancy React #hooks🎣 .

As we've moved towards the above tech, its really made smashing out new features and updating legacy code super fast, and really fun!

See more
Malthe Jørgensen
Malthe Jørgensen
CTO at Peergrade · | 13 upvotes · 42.8K views
atPeergradePeergrade
Amazon RDS
Amazon RDS
Graphene
Graphene
GraphQL
GraphQL
Django
Django
PostgreSQL
PostgreSQL

We recently switched from MongoDB and the Python library MongoEngine to PostgreSQL and Django in order to:

  • Better leverage GraphQL (using the Graphene library)
  • Allow us to use the autogenerated Django admin interface
  • Allow better performance due to the way some of our pages present data
  • Give us more a mature stack in the form of Django replacing MongoEngine, which we had some issues with in the past.

MongoDB was hosted on mlab, and we now host Postgres on Amazon RDS .

See more
Seun Kola
Seun Kola
CTO at Virtualrobe Limited · | 7 upvotes · 8.4K views
Apollo
Apollo
Prisma
Prisma
React
React
GraphQL
GraphQL

Using GraphQL for queries and mutation on React app and Prisma database is so cool, easy and fast to learn. i often use Apollo client to integrate both ends. Most times working has a frontend developer and trying to build a MVP product quickly requires tools that require less setup on both production and development in order to test functionalities, and using GraphQL for queries surpasses Rest queries for me because of the flexibility in requesting the data you actually need and not requesting the whole dataset everytime.

But in all, Rest is still the king since most public api support its CRUD processes more than GraphQL but lot of top companies are using it and am definitely using it for various project including my recent pet project(Delivery buddy - A platform that allows pair-to-pair delivery service).

See more
Python
Python
Django
Django
JavaScript
JavaScript
Node.js
Node.js

Django or NodeJS? Hi, I’m thinking about which software I should use for my web-app. What about Node.js or Django for the back-end? I want to create an online preparation course for the final school exams in my country. At the beginning for maths. The course should contain tutorials and a lot of exercises of different types. E.g. multiple choice, user text/number input and drawing tasks. The exercises should change (different levels) with the learning progress. Wrong questions should asked again with different numbers. I also want a score system and statistics. So far, I have got only limited web development skills. (some HTML, CSS, Bootstrap and Wordpress). I don’t know JavaScript or Python.

Possible pros for Python / Django: - easy syntax, easier to learn for me as a beginner - fast development, earlier release - libraries for mathematical and scientific computation

Possible pros for JavaScript / Node.js: - great performance, better choice for real time applications: user should get the answer for a question quickly

Which software would you use in my case? Are my arguments for Python/NodeJS right? Which kind of database would you use?

Thank you for your answer!

Node.js JavaScript Django Python

See more
Seun Kola
Seun Kola
CTO at Virtualrobe Limited · | 2 upvotes · 6.8K views
ExpressJS
ExpressJS
Apollo
Apollo
GraphQL
GraphQL
Prisma
Prisma
React Native
React Native
React
React

Have been working on a side project that focuses on sharing economy, allowing users to pickup and deliver groceries for others. Have already started working on the frontend for the web dashboard using React and plan to use React Native for the mobile app. But am in a dilemma, whether to build the backend myself for the MVP or use firebase for the backend. I need advise, has anyone use Firebase for such project and what are the pros and cons, what issues will i faced.

Note: My proposed stack for the backend is a Prisma database, GraphQL , Apollo and ExpressJS

Thanks in advance to everyone.

See more
Benjamin Bernard-Bouissières
Benjamin Bernard-Bouissières
Web Developer at ipexia · | 11 upvotes · 38.8K views
atipexiaipexia
PythonAnywhere
PythonAnywhere
Symfony
Symfony
Python
Python
Django
Django

I really love Django because it is really fast to create a web application from scratch and it has a lot a facilities like the ORM or the Admin module ! The Python language is really easy to read and powerful, that's why I prefer Django over Symfony.

I use Django at work to make tools for the technicians but I also use it for me to build my personal website which I host on PythonAnywhere.

See more
Munkhtegsh Munkhbat
Munkhtegsh Munkhbat
Software Engineer Consultant at LoanSnap · | 9 upvotes · 18K views
GraphQL
GraphQL
Apollo
Apollo
React
React
Heroku
Heroku
styled-components
styled-components
PostgreSQL
PostgreSQL
Prisma
Prisma
graphql-yoga
graphql-yoga
#Frontend
#Backend

In my last side project, I built a web posting application that has similar features as Facebook and hosted on Heroku. The user can register an account, create posts, upload images and share with others. I took an advantage of graphql-subscriptions to handle realtime notifications in the comments section. Currently, I'm at the last stage of styling and building layouts.

For the #Backend I used graphql-yoga, Prisma, GraphQL with PostgreSQL database. For the #FrontEnd: React, styled-components with Apollo. The app is hosted on Heroku.

See more
Michael Mota
Michael Mota
CEO & Founder at AlterEstate · | 6 upvotes · 8.5K views
atAlterEstateAlterEstate
Django
Django
Graphene
Graphene
GraphQL
GraphQL

We recently implemented GraphQL because we needed to build dynamic reports based on the user preference and configuration, this was extremely complicated with our actual RESTful API, the code started to get harder to maintain but switching to GraphQL helped us to to build beautiful reports for our clients that truly help them make data-driven decisions.

Our goal is to implemented GraphQL in the whole platform eventually, we are using Graphene , a python library for Django .

See more
Michael Mota
Michael Mota
CEO & Founder at AlterEstate · | 4 upvotes · 865 views
Next.js
Next.js
Graphene
Graphene
GraphQL
GraphQL
Django
Django

I've been using Django for quite a long time and in my opinion I would never switch from it. My company is currently using Django with REST framework and a part in GraphQL using Graphene. On the frontend we use Next.js and so far everything has been running quite good. I've found limitations but manage to solve it.

As someone mentioned before, if you are comfortable with Django, don't switch. There's no need since with django you can basically achieve anything. Of course this will depend on the project you want to build, but the scalability and flexibility django can offer it's just out of this world. (Don't want to sound like a fan boy haha but it really is).

See more
Interest over time
Reviews of Django and GraphQL
No reviews found
How developers use Django and GraphQL
Avatar of MOKA Analytics
MOKA Analytics uses DjangoDjango

Django takes the hassle out of building an enterprise web application using Python.

  • admin app for administration
  • ORM for deploying against different database vendors
  • social auth package for authentication with enterprise IdP
  • guardian package for authorization
Avatar of Yaakov Gesher
Yaakov Gesher uses DjangoDjango

Our backend was written in Django. We took advantage of the ready-to-go admin interface as a go-to solution for the client to be able to authorize his users, as well as other functionality, while most of the work was done through the Django Rest Framework.

Avatar of Blair Gemmer
Blair Gemmer uses DjangoDjango

Hands down the best Python web framework I've used. Very easy to extend and add apps and go from 0 to full project quickly and painlessly. I built a fully authenticated project with a single endpoint in less than 30 minutes.

Avatar of jasonmjohnson
jasonmjohnson uses GraphQLGraphQL

GraphQL will be used as the public API for the data persistence layer. It communicates nicely with all other languages and can provide API responses in the format specified in the request.

Avatar of Kang Hyeon Ku
Kang Hyeon Ku uses DjangoDjango

정말 편리하고 많은것을 알아서 제공해 주는 프레임워크 이다. 책의 예제만 진행해서 많이 써보지는 못했지만, 쉽게 쉽게 웹을 개발 할 수 있는 점이 매력적 이다. 게다가 orm 이 기본으로 내장 되어 있고 db 도 sqlite 가 기본으로 되어있어. 그냥 django 만 설치하면 바로 웹개발이 가능하다.

Avatar of Seungkwon Park
Seungkwon Park uses DjangoDjango

django는 저의 무기입니다.

django 이외에 flask로 간단한 restful api를 만들면서 느낀점은 framework 보다 언어가 중요하다는것을 알았고 django가 얼마나 큰 framework인지 알게되었습니다.

저는 signal 사용을 좋아합니다.

Avatar of Nick De Cooman
Nick De Cooman uses GraphQLGraphQL

Applied GraphQL in a side-project I'm currently working on. Using the Apollo GraphQL implementation for both server-side and React client.

Avatar of Hevelop
Hevelop uses GraphQLGraphQL

From Magento 2.3 GraphQL is provider by a core implementation, this is used to implement PWA frontend.

Avatar of Told
Told uses GraphQLGraphQL

We use GraphQL as our transport standard for all API calls.

Avatar of Michael Manges
Michael Manges uses GraphQLGraphQL

Connecting my Gatsby site to GraphCMS.

How much does Django cost?
How much does GraphQL cost?
Pricing unavailable
Pricing unavailable