Need advice about which tool to choose?Ask the StackShare community!
GraphQL vs graphql.js: What are the differences?
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; graphql.js: A Simple and Isomorphic GraphQL Client for JavaScript. Lightest GraphQL client with intelligent features. You can download graphql.js directly, or you can use Bower or NPM.
GraphQL and graphql.js can be primarily classified as "Query Languages" tools.
Some of the features offered by GraphQL are:
- Hierarchical
- Product-centric
- Client-specified queries
On the other hand, graphql.js provides the following key features:
- No dependencies, plain vanilla JavaScript.
- Plug & Play.
- Isomorphic.
GraphQL and graphql.js are both open source tools. It seems that GraphQL with 11.7K GitHub stars and 753 forks on GitHub has more adoption than graphql.js with 1.96K GitHub stars and 62 GitHub forks.
Pros of GraphQL
- Schemas defined by the requests made by the user74
- Will replace RESTful interfaces62
- The future of API's60
- The future of databases48
- Self-documenting12
- Get many resources in a single request11
- Query Language5
- Ask for what you need, get exactly that5
- Fetch different resources in one request3
- Evolve your API without versions3
- Type system3
- Easy setup2
- GraphiQL2
- Ease of client creation2
- Good for apps that query at build time. (SSR/Gatsby)1
- Backed by Facebook1
- Easy to learn1
- "Open" document1
- Better versioning1
- Standard1
- 1. Describe your data1
- Fast prototyping1
Pros of graphql.js
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
- All the pros sound like NFT pitches1
- Works just like any other API at runtime1