3 ms·
GraphQL and SQL are not mutually exclusive at all. GraphQL is, in no way, faster than any REST alternative in terms of implementation speed. If anything, it is
by wmichelin 6y ago
GraphQL and SQL are not mutually exclusive at all.
GraphQL is, in no way, faster than any REST alternative in terms of implementation speed. If anything, it is slower, as you need to be extremely methodical with your API changes, as (same with REST I suppose) deprecating fields / entities, for mobile clients specifically, is a PITA unless your clients have really nicely built out forced upgrades.
What GraphQL _does_ give you, is type safety and extreme client flexibility . It is a better solution than REST in almost every scenario, other than the initial learning curve, which takes a couple weeks and then you know it forever.
Would I recommend some startup write a GraphQL API for their MVP? No, just get something working. Are you at a more medium-sized company looking to build out your much more permanent API? Then yes, you should probably strongly consider GraphQL.
- virtue3 6y agoMVP? Just use your apollo/GraphQL server as the node monolith and be done with it.
- watwut 6y agoI have seen startup using GraphQL for mvp, precisedly because they could change and crank ui fast. They already knew GraphQL, I did not when I joined and learned to modify already existing one in a day or so.
- Draiken 6y agoToo bad nobody thinks whether or not they need the flexibility in the first place. MVPs with single clients using GraphQL for flexibility that is not needed or used are common. GraphQL is a hammer, and now every project is a nail. Anecdotal, of course, but the first thing all FE developers I've ever worked with do when they start/join a project is add/suggest GraphQL/Apollo. Nobody considers how awful things look on the back-end when you need to cache or make magic happen to avoid thousands of N+1 queries. I believe unfortunately it has become the only way many front-end developers learn to interact with any back-end, and now everyone's forced to use it regardless of its drawbacks. Same with React. Facebook managed to get free training for all of their future hires. I hate the company but that was a genius move.