Which approach suits.
CHOOSE REST WHEN
The API is public Consumers are varied and unknown Caching by address is valuable Simplicity matters
CHOOSE GRAPHQL WHEN
Many clients need different subsets of data Assembling a view requires many requests The data is highly interconnected
CHOOSE GRPC WHEN
Services communicate internally Volume is high and efficiency matters A strict contract across languages is valuable
WHAT MOST APPLICATIONS NEED
A well-designed REST API.
WHY
It is simplest, most widely understood, and adequate for the majority of requirements.
WHAT TO AVOID
Choosing by fashion Adopting complexity for problems you do not have
WHAT TO CONSIDER
Using more than one, for different purposes.
WHAT THAT LOOKS LIKE
REST for external consumers, gRPC internally.
WHAT TO WEIGH
Who consumes it, and what they can handle.
WHAT TO ASK
Which of these problems do we actually have?
WHAT TO DOCUMENT
The decision, and its reasoning.