Need advice about which tool to choose?Ask the StackShare community!
GraphQL vs Prisma: 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 Prisma? Prisma makes working with databases easy. Prisma is a powerful database tool used for data access, migrations and visual data management. It replaces traditional ORMs and removes friction from complicated database workflows.
GraphQL and Prisma can be categorized as "Query Languages" tools.
Some of the features offered by GraphQL are:
- Hierarchical
- Product-centric
- Client-specified queries
On the other hand, Prisma provides the following key features:
- Simplified & type-safe database access
- Declarative migrations & data modeling
- Powerful & visual data management
GraphQL and Prisma are both open source tools. It seems that Prisma with 14.7K GitHub stars and 857 forks on GitHub has more adoption than GraphQL with 11.7K GitHub stars and 752 GitHub forks.
StackShare, Twitter, and Intuit are some of the popular companies that use GraphQL, whereas Prisma is used by Powersports Auction, Seistreinta, and AnkaWorld. GraphQL has a broader approval, being mentioned in 541 company stacks & 715 developers stacks; compared to Prisma, which is listed in 14 company stacks and 14 developer stacks.
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 Prisma
- Type-safe database access11
- Open Source10
- Auto-generated query builder8
- Supports multible database systems6
- Increases confidence during development6
- Productive application development4
- Built specifically for Postgres and TypeScript4
- Supports multible RDBMSs2
- Robust migrations system1
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
Cons of Prisma
- Doesn't support downward/back migrations2
- Doesn't support JSONB1
- Do not support JSONB1
- Mutation of JSON is really confusing1
- Do not support JSONB1
- Jjj0