REST API vs GraphQL
Last updated
Was this helpful?
Last updated
Was this helpful?
Both make http call from client to server and response in json format
The data format and operation is defined by API route itself, each API end point have a clear definition
Easy to cache with CDN, proxies
Simple to make a call
The data format and operation is defined by client, The data definition is flexible
Hard to cache
Require time to learn, including query definition, tooling support to make call
If data format is different from lots of application, there is time-wasting to develop various API end points to support different application, GraphQL is a better choice
Otherwise, In considering common practice, learning curve, the clearness of definition, REST API is a better choice for business