4. ‣ Requires multiple round trips for fetching complex object graphs
‣ Over fetching — As the model grows, so does the payload
‣ High potential for breaking API changes
‣ Structure of the response dictated by the server
‣ Potentially a huge amount of different endpoints and thus complexity
‣ No formal specification resulting in various other shortcomings
PROBLEMS WITH REST
6. Multiple round trips
When fetching complex, relational data structures: In
order to descent further into the object graph,
multiple round trips to the server are required.
7.
8. Over fetching
Unless specifically designed for a given purpose, you
often have to deal with needlessly large and bloated
responses.
9.
10. Compatibility and versioning
By changing your model you are very likely to break
your APIs. API versioning can mitigate that potential
damage at the cost of exponentially increasing
complexity.
11. Endpoints galore
Attempting to circumvent the aforementioned
problems often leads to a huge amount of bespoke/
ad-hoc endpoints. This, in turn, inevitably increases
the complexity of your application.
12. Your API is usually
composed of a
spectrum of different
interpretations of REST
13. No formal specification
No prescribed pattern for deprecation.
No standardized introspection functionality.
…
19. What is GraphQL?
GraphQL is a query language designed to build client
applications by providing an intuitive and flexible
syntax and system for describing their data
requirements and interactions.
20. IT IS NOT A QUERY
LANGUAGE FOR A
GRAPH DATABASE