4 ms·
I prefer GraphQL because making beautiful and convenient large REST APIs is very difficult, almost impossible, while it's trivial in GraphQL. I feel like REST
by speedgoose 4y ago
I prefer GraphQL because making beautiful and convenient large REST APIs is very difficult, almost impossible, while it's trivial in GraphQL.
I feel like REST is shoehorned on top of HTTP, which was never designed for that. It has some advantages such as accessing features from the HTTP toolchain, like easy caching and many developer tools, but I think GraphQL is more adapted as an API layer unless you want a tiny CRUD API for one resource.
Also I think GraphQL schemas are easier to work with than Swagger/OpenAPI specifications.
You have many other alternatives too, such as SOAP, CORBA, or gRPC, but I would prefer GraphQL unless an alternative is a lot more adapted to my problem. It's still JSON and HTTP, which makes it easy to work with, and it's powerful enough.