2 ms·
Correct, but it's worth noting that GraphQL has much more to offer than just request performance. I'd argue that performance improvements is the less interestin
by arthens 7y ago
Correct, but it's worth noting that GraphQL has much more to offer than just request performance. I'd argue that performance improvements is the less interesting part of GraphQL.
The main selling points for me are:
- speed of development: once you have a complete graph, you can add new pages/features at a fraction of the time, and often without touching the backend at all
- type safety: you can generate typescript/flow types for your queries, giving you type safety from db to client (assuming your backend has types)
- query co-location: you can have the query (or a fragment) inside or next the component that uses it. Need a new field in a specific component? Just update the fragment, any page that includes it will get it by automatically
and last but not least developer experience. Having worked for a few years using graphql + apollo + react + typescript (on both a personal and a reasonably famous large website) I can honestly say that it feels like living in the future. As a mostly backend developer, I have never enjoyed working in the frontend so much.
- Ozzie_osman 7y agoWell said. That's why my current team started using graphql. It actually had very little to do with performance or anything backend-related, and mostly because of the same reasons (FE speed of development, type checking, etc).