GraphQL vs REST vs gRPC Pizza Analogy

This is not to provide you with any technical internals or implementation details, maybe just to establish a mental model. It might come handy when deciding what to use.

Imagine you are craving Pizza. You have three options…

Order from a pizza place that has preset pizza menu. No customization of size or toppings, that’s REST.

A pizza place that allows you complete customization of size and toppings, that’s GraphQL. Probably will be slower than REST.

The third option is a frozen pizza you have it in your fridge. You already bought the kind you like, that’s gRPC. This is the fastest way you will get your pizza.

And just like Pizza relies on dough, they all rely on HTTP

Leave a comment