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


+ 1

+ 1
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 StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of GraphQL
Pros of Redux
  • 74
    Schemas defined by the requests made by the user
  • 62
    Will replace RESTful interfaces
  • 60
    The future of API's
  • 48
    The future of databases
  • 12
  • 11
    Get many resources in a single request
  • 5
    Query Language
  • 5
    Ask for what you need, get exactly that
  • 3
    Fetch different resources in one request
  • 3
    Evolve your API without versions
  • 3
    Type system
  • 2
    Easy setup
  • 2
  • 2
    Ease of client creation
  • 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
  • 1
    1. Describe your data
  • 1
    Fast prototyping
  • 190
    State is predictable
  • 149
    Plays well with React and others
  • 125
    State stored in a single object tree
  • 78
    Hot reloading out of the box
  • 72
    Allows for time travel
  • 14
    You can log everything
  • 11
    Great tutorial direct from the creator
  • 6
    Test without browser
  • 6
    Endorsed by the creator of Flux
  • 5
    Easy to debug
  • 2
    Enforces one-way data flow
  • 2
    Granular updates
  • 1

Sign up to add or upvote prosMake informed product decisions

Cons of GraphQL
Cons of Redux
  • 4
    Hard to migrate from GraphQL to another technology
  • 4
    More code to type.
  • 2
    Takes longer to build compared to schemaless.
  • 1
    All the pros sound like NFT pitches
  • 1
    Works just like any other API at runtime
  • 11
    Lots of boilerplate
  • 6
  • 5
  • 4
    Steeper learning curve than RxJs
  • 4
    Steeper learning curve than MobX
  • 4
    Steep learning curve

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 StackShare EnterpriseLearn 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 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 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.
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.
Lightest GraphQL client with intelligent features. You can download graphql.js directly, or you can use Bower or NPM.
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