REST, GraphQL and gRPC
medium 26 minThree ways to offer an API.
Where it shows up
The same pattern appears across everyday software.
GitHub
Offers a REST API and a GraphQL API to the public, so a client can choose between simple addresses and precise queries.
Facebook
Created GraphQL in 2012 for its native mobile apps, where one screen needs nested data from many places.
Google
Built gRPC after years of using an internal RPC system called Stubby between its services.
Kubernetes
Its API server offers resource-style HTTP to users, while the node agent talks to the container runtime over gRPC.
etcd
The key-value store behind Kubernetes exposes a gRPC API, with streams that watch for changes.
Shopify
Gives app developers a GraphQL Admin API with a cost limit per query: a public endpoint must protect itself.