Need advice about which tool to choose?Ask the StackShare community!
GraphQL vs Sails.js: 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 Sails.js? Realtime MVC Framework for Node.js. Sails is designed to mimic the MVC pattern of frameworks like Ruby on Rails, but with support for the requirements of modern apps: data-driven APIs with scalable, service-oriented architecture.
GraphQL can be classified as a tool in the "Query Languages" category, while Sails.js is grouped under "Microframeworks (Backend)".
"Schemas defined by the requests made by the user" is the top reason why over 61 developers like GraphQL, while over 41 developers mention "Data-driven apis " as the leading cause for choosing Sails.js.
GraphQL and Sails.js are both open source tools. It seems that Sails.js with 20.6K GitHub stars and 1.85K forks on GitHub has more adoption than GraphQL with 11.7K GitHub stars and 752 GitHub forks.
Twitter, Intuit, and Yelp are some of the popular companies that use GraphQL, whereas Sails.js is used by TestLegends, HYPH, and Giguana. GraphQL has a broader approval, being mentioned in 541 company stacks & 716 developers stacks; compared to Sails.js, which is listed in 32 company stacks and 12 developer stacks.
Pros of GraphQL
- Schemas defined by the requests made by the user75
- Will replace RESTful interfaces63
- The future of API's62
- The future of databases49
- Self-documenting13
- Get many resources in a single request12
- Query Language6
- Ask for what you need, get exactly that6
- Fetch different resources in one request3
- Type system3
- Evolve your API without versions3
- Ease of client creation2
- GraphiQL2
- Easy setup2
- "Open" document1
- Fast prototyping1
- Supports subscription1
- Standard1
- Good for apps that query at build time. (SSR/Gatsby)1
- 1. Describe your data1
- Better versioning1
- Backed by Facebook1
- Easy to learn1
Pros of Sails.js
- Data-driven apis49
- Waterline ORM47
- Mvc37
- Easy rest32
- Real-time25
- Open source21
- Service-oriented architecture19
- Scalable18
- Convension over configuration10
- Rails-like asset pipeline9
- Node machines and machinepacks9
- Easy route/controller generation7
- Ruby on Rails basic stuff for JS devs6
- CLI for scaffolding project pieces3
- WebSocket support3
- Supportive community1
Sign up to add or upvote prosMake informed product decisions
Cons of GraphQL
- Hard to migrate from GraphQL to another technology4
- More code to type.4
- Takes longer to build compared to schemaless.2
- No support for caching1
- All the pros sound like NFT pitches1
- No support for streaming1
- Works just like any other API at runtime1
- N+1 fetch problem1
- No built in security1
Cons of Sails.js
- Waterline ORM5
- Defaults to VueJS4
- Standard MVC0