DEV Community

loading...

Discussion on: Time to stop using REST...

Collapse
richardhaven profile image
No Clever Code

Another CON of GraphQL is the inability for optimization beyond DataLoader. As each generation knows only about itself and a limited amount about dependents, the system as a whole cannot use multigenerational joins or optimizations

Public API's do well with GraphQL as the hosts don't know exactly what the callers want from the API. Internal API's are less clear-cut. Often, the caller developer and the host developer are teammates, and the efficiency of a focused REST (or gRPC) call is better

flexibility ∝ efficiency⁻¹