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

GraphQL

21.7K
17.5K
+ 1
292
Redux

20.8K
15.3K
+ 1
647
Add tool

GraphQL vs Redux: What are the differences?

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.

What is Redux? Predictable state container for JavaScript apps. Redux helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.

GraphQL can be classified as a tool in the "Query Languages" category, while Redux is grouped under "State Management Library".

Some of the features offered by GraphQL are:

  • Hierarchical
  • Product-centric
  • Client-specified queries

On the other hand, Redux provides the following key features:

  • Predictable state
  • Easy testing
  • Works with other view layers besides React

"Schemas defined by the requests made by the user", "Will replace RESTful interfaces" and "The future of API's" are the key factors why developers consider GraphQL; whereas "State is predictable", "Plays well with React and others" and "State stored in a single object tree" are the primary reasons why Redux is favored.

GraphQL and Redux are both open source tools. It seems that Redux with 49.5K GitHub stars and 12.8K forks on GitHub has more adoption than GraphQL with 11.7K GitHub stars and 753 GitHub forks.

According to the StackShare community, Redux has a broader approval, being mentioned in 1036 company stacks & 836 developers stacks; compared to GraphQL, which is listed in 561 company stacks and 750 developer stacks.

Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of GraphQL
Pros of Redux
  • 69
    Schemas defined by the requests made by the user
  • 62
    Will replace RESTful interfaces
  • 59
    The future of API's
  • 47
    The future of databases
  • 12
    Self-documenting
  • 11
    Get many resources in a single request
  • 5
    Ask for what you need, get exactly that
  • 4
    Query Language
  • 3
    Evolve your API without versions
  • 3
    Fetch different resources in one request
  • 3
    Type system
  • 2
    GraphiQL
  • 2
    Ease of client creation
  • 2
    Easy setup
  • 1
    Good for apps that query at build time. (SSR/Gatsby)
  • 1
    Backed by Facebook
  • 1
    Easy to learn
  • 1
    "Open" document
  • 1
    Better versioning
  • 1
    Standard
  • 1
    1. Describe your data
  • 1
    Fast prototyping
  • 186
    State is predictable
  • 147
    Plays well with React and others
  • 123
    State stored in a single object tree
  • 77
    Hot reloading out of the box
  • 71
    Allows for time travel
  • 13
    You can log everything
  • 10
    Great tutorial direct from the creator
  • 6
    Test without browser
  • 6
    Endorsed by the creator of Flux
  • 4
    Easy to debug
  • 2
    Granular updates
  • 1
    Blabla
  • 1
    Enforces one-way data flow

Sign up to add or upvote prosMake informed product decisions

Cons of GraphQL
Cons of Redux
  • 3
    Hard to migrate from GraphQL to another technology
  • 3
    More code to type.
  • 1
    Works just like any other API at runtime
  • 1
    Takes longer to build compared to schemaless.
  • 10
    Lots of boilerplate
  • 5
    Verbose
  • 4
    Design
  • 3
    Steep learning curve
  • 3
    Steeper learning curve than MobX
  • 3
    Steeper learning curve than RxJs

Sign up to add or upvote consMake informed product decisions

What companies use GraphQL?
What companies use Redux?
See which teams inside your own company are using GraphQL or Redux.
Sign up for Private StackShareLearn More

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

What tools integrate with GraphQL?
What tools integrate with Redux?

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

What are some alternatives to GraphQL and Redux?
gRPC
gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking...
Falcor
Falcor lets you represent all your remote data sources as a single domain model via a virtual JSON graph. You code the same way no matter where the data is, whether in memory on the client or over the network on the server.
React
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
graphql.js
Lightest GraphQL client with intelligent features. You can download graphql.js directly, or you can use Bower or NPM.
MongoDB
MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
See all alternatives