Public API Choices

1892 2018-10-04 01:38

JSON RPC

GraphQL

REST

gRPC

Usecases

Etherum

Github V2, Airbnb, Facebook

BFF / API Gateway

Swagger

High performance, Google

Single Endpoint

Yes

Yes

No

Yes

Type System

Yes

No uint64

Yes

No uint64

Yes w/ Swagger

No uint64

Yes,

has uint64

Tailored Results

No

Yes

No

No

Batch nested queries

No

Yes

No

No

Versioning

No

Schema Extension

Yes, w/ v1/v2 route s

Field Numbers in protobuf

Error Handling

Structured

Structured

HTTP Status Code

Structured

Cross-platform

Yes

Yes

Yes

Yes

Playground UI

No

GraphQL Bin

Swagger

No

Performance tracing

Apollo plugin

caching

No or HTTP cache control

Apollo plugin

HTTP cache control

Native support not yet. but still yes w/ HTTP cache control

Problem

Lack of community support and toolchain

Barrister IDL

42.51 kb client-side bundle size

Unstructured with multiple endpoints. awful portability.

Grpc-web dev in progress

140kb JS bundle

Not all places support HTTP2

© 2010-2018 Tian
Built with ❤️ in San Francisco