Need advice about which tool to choose?Ask the StackShare community!
GraphQL vs Play: 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 Play? The High Velocity Web Framework For Java and Scala. Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.
GraphQL belongs to "Query Languages" category of the tech stack, while Play can be primarily classified 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 "Scala", "Web-friendly architecture" and "Built on akka" are the primary reasons why Play is favored.
GraphQL and Play are both open source tools. GraphQL with 11.7K GitHub stars and 753 forks on GitHub appears to be more popular than Play with 11.2K GitHub stars and 3.77K GitHub forks.
Facebook, Instagram, and Twitter are some of the popular companies that use GraphQL, whereas Play is used by Coursera, Zalando, and Keen. GraphQL has a broader approval, being mentioned in 561 company stacks & 750 developers stacks; compared to Play, which is listed in 112 company stacks and 47 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
- Get many resources in a single request12
- Self-documenting12
- Ask for what you need, get exactly that6
- Query Language6
- 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 Play
- Scala81
- Web-friendly architecture55
- Built on akka55
- Stateless50
- High-scalable47
- Fast46
- Open source40
- Java34
- High velocity27
- Fun24
- Lightweight9
- Non-blocking io8
- Developer friendly6
- Simple template engine5
- Scalability4
- Pure love3
- Resource efficient2
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 Play
- Evolves fast, keep up with releases3
- Unnecessarily complicated1