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

GraphQL

17.3K
13.6K
+ 1
287
Node.js

98.3K
78.2K
+ 1
8.3K
Add tool

GraphQL vs Node.js: What are the differences?

Developers describe GraphQL as "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. On the other hand, Node.js is detailed as "A platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications". 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.

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

"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 "Npm", "Javascript" and "Great libraries" are the primary reasons why Node.js is favored.

GraphQL and Node.js are both open source tools. Node.js with 35.5K GitHub stars and 7.78K forks on GitHub appears to be more popular than GraphQL with 11.7K GitHub stars and 753 GitHub forks.

Uber Technologies, Netflix, and Medium are some of the popular companies that use Node.js, whereas GraphQL is used by Facebook, Instagram, and Twitter. Node.js has a broader approval, being mentioned in 4104 company stacks & 4039 developers stacks; compared to GraphQL, which is listed in 561 company stacks and 750 developer stacks.

Decisions about GraphQL and Node.js
Omran Jamal
CTO & Co-founder at Bonton Connect · | 7 upvotes · 145.5K views

We actually initially wrote a lot of networking code in Kotlin but the complexities involved prompted us to try and compile NodeJS for Android and port over all the networking logic to Node and communicate with node over the Java Native Interface.

This turned out to be a great decision considering our battery usage fell by 40% and rate of development increased by a factor of 2.

See more

As a small team, we wanted to pick the framework which allowed us to move quickly. There's no option better than Rails. Not having to solve the fundamentals means we can more quickly build our feature set. No other framework can beat ActiveRecord in terms of integration & ease-of use. To top it all of, there's a lot of attention paid to security in the framework, making almost everything safe-by-default.

See more

Hey guys,

My backend set up is Prisma / GraphQL-Yoga at the moment, and I love it. It's so intuitive to learn and is really neat on the frontend too, however, there were a few gotchas when I was learning! Especially around understanding how it all pieces together (the stack). There isn't a great deal of information out there on exactly how to put into production my set up, which is a backend set up on a Digital Ocean droplet with Prisma/GraphQL Yoga in a Docker Container using Next & Apollo Client on the frontend somewhere else. It's such a niche subject, so I bet only a few hundred people have got a website with this stack in production. Anyway, I wrote a blog post to help those who might need help understanding it. Here it is, hope it helps!

See more
Pros of GraphQL
Pros of Node.js
  • 69
    Schemas defined by the requests made by the user
  • 62
    Will replace RESTful interfaces
  • 58
    The future of API's
  • 47
    The future of databases
  • 11
    Self-documenting
  • 10
    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
    Type system
  • 2
    Easy setup
  • 2
    Fetch different resources in one request
  • 2
    Ease of client creation
  • 2
    GraphiQL
  • 1
    Standard
  • 1
    Good for apps that query at build time. (SSR/Gatsby)
  • 1
    "Open" document
  • 1
    Easy to learn
  • 1
    Backed by Facebook
  • 1
    1. Describe your data
  • 1
    Fast prototyping
  • 1
    Better versioning
  • 1.4K
    Npm
  • 1.3K
    Javascript
  • 1.1K
    Great libraries
  • 1K
    High-performance
  • 789
    Open source
  • 477
    Great for apis
  • 467
    Asynchronous
  • 414
    Great community
  • 385
    Great for realtime apps
  • 290
    Great for command line utilities
  • 77
    Node Modules
  • 75
    Websockets
  • 65
    Uber Simple
  • 53
    Great modularity
  • 53
    Allows us to reuse code in the frontend
  • 38
    Easy to start
  • 33
    Great for Data Streaming
  • 29
    Realtime
  • 25
    Awesome
  • 23
    Non blocking IO
  • 16
    Can be used as a proxy
  • 15
    High performance, open source, scalable
  • 14
    Non-blocking and modular
  • 13
    Easy and Fun
  • 12
    Same lang as AngularJS
  • 11
    Easy and powerful
  • 10
    Future of BackEnd
  • 9
    Fast
  • 8
    Cross platform
  • 8
    Scalability
  • 6
    Mean Stack
  • 6
    Fullstack
  • 6
    Simple
  • 5
    Easy concurrency
  • 5
    Great for webapps
  • 4
    Easy to use and fast and goes well with JSONdb's
  • 4
    Friendly
  • 4
    React
  • 4
    Fast, simple code and async
  • 4
    Typescript
  • 3
    Its amazingly fast and scalable
  • 3
    Isomorphic coolness
  • 3
    Great speed
  • 3
    Scalable
  • 3
    Control everything
  • 3
    Fast development
  • 2
    One language, end-to-end
  • 2
    Scales, fast, simple, great community, npm, express
  • 2
    TypeScript Support
  • 2
    Easy to learn
  • 2
    Easy to use
  • 2
    It's fast
  • 2
    Less boilerplate code
  • 2
    Blazing fast
  • 2
    Not Python
  • 2
    Performant and fast prototyping
  • 2
    Sooper easy for the Backend connectivity
  • 2
    Great community
  • 1
    Easy
  • 1
    Lovely
  • 0
    Event Driven
  • 0
    Javascript2

Sign up to add or upvote prosMake informed product decisions

Cons of GraphQL
Cons of Node.js
  • 3
    More code to type.
  • 2
    Hard to migrate from GraphQL to another technology
  • 1
    Works just like any other API at runtime
  • 1
    Takes longer to build compared to schemaless.
  • 46
    Bound to a single CPU
  • 37
    New framework every day
  • 33
    Lots of terrible examples on the internet
  • 28
    Asynchronous programming is the worst
  • 22
    Callback
  • 16
    Javascript
  • 11
    Dependency based on GitHub
  • 10
    Dependency hell
  • 10
    Low computational power
  • 7
    Can block whole server easily
  • 6
    Callback functions may not fire on expected sequence
  • 6
    Very very Slow
  • 3
    Unneeded over complication
  • 3
    Breaking updates
  • 3
    Unstable
  • 1
    No standard approach

Sign up to add or upvote consMake informed product decisions

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.

What is 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.

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

What companies use GraphQL?
What companies use Node.js?

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

What tools integrate with GraphQL?
What tools integrate with Node.js?

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

Blog Posts

Oct 24 2019 at 7:43PM
https://img.stackshare.io/stack/513891/default_86b138c409d64e353c3d509121b4ac1dd9cf31c4.png logo

AppSignal

JavaScriptNode.jsJava+8
5
660
Oct 3 2019 at 7:13PM
https://img.stackshare.io/stack/511159/default_5f04358e03a27bf2607a39dd9b409dd7830ce4d3.png logo

Ably Realtime

JavaScriptPythonNode.js+8
4
3123
Node.jsnpmKubernetes+6
1
1064
GitNode.jsFirebase+5
7
1481
What are some alternatives to GraphQL and Node.js?
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
Interest over time