DEV Community

Discussion on: Why Rest api's are Good and Graphql api's Better

Collapse
 
bolt04 profile image
David Pereira

In my opinion, GraphQL APIs aren't better or worst than RESTful APIs, they are a different design choice. We decide to choose one over the other depending on the problem and use cases we have 🙂.

Having that said, I think if your domain model is like a graph with tons of relationships, GraphQL is a good choice.

If you want, check out OData for RESTfull APIs and hypermedia (e.g. HAL-JSON) for ways to design your API that help the client fetch the data it requires, in a similar way GraphQL allows you 👍

Collapse
 
ayeolakenny profile image
ayeolakenny

Yh i agree with you, didn't know there was a way to fetch data that you only require in REST, ill check that out, cause thats my main pain point with rest, thanks.