GraphQL
lastmod 2025-12-16created 2017-02-1117 edits
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.
Categories
- async-graphql - The GraphQL server library implemented by rust
- GraphJin - Build GraphQL APIs fast
- Graphqurl
- tuql - A tool that automatically generates a GraphQL server from an SQLite DB
- Graphweaver - Combine multiple data sources into a single GraphQL API
GraphQL is great, but seems a bit overhyped
GraphQL is great, but seems a bit overhyped. Beginner-to-intermediate developers seem to end up using GraphQL after watching YouTube, and that seems wrong.
Pros
- Easy to describe the data you want
- Saves bandwidth. You can fetch as much as you want in one go
- Easy to create documentation for data consumers
- Subscriptions are easier to use
- API calls can be batched together
Cons
- Painful to actually use. Depending on your backend, unless it generates them in your language, you have to maintain two or more type systems
- No support for maps/tables/dictionaries. This is a really big one. You don't want to, but somewhere you end up writing
{[key: string] : T} - No clear approach to API versioning. You'll end up doing things like MyQueryV1.01 MyQueryV1.02 MyQueryV1.03
Unless you are dealing with the set of solutions/problems Facebook intended GraphQL for, don't use GraphQL. What words of wisdom can other senior developers offer to save junior developers from falling into this quagmire?
See also
Favorite site
- GraphQL web site
- GraphQL with Produce 48
- Getting the concepts of GraphQL - tech.kakao.com
- Differences between GraphQL and REST | Hwasurr's Devlog
- GraphQL: The enterprise honeymoon is over | GeekNews
- In conclusion, the assessment is that GraphQL is useful in specific situations but is an excessive choice for most enterprises