←back to thread

153 points michaelanckaert | 3 comments | | HN request time: 0.447s | source
1. pknopf ◴[] No.23489295[source]
I firmly believe GraphQL is a fad. It will never work, exposing the ORM to your clients.

I'm curious, why don't we see more public-facing APIs using gRPC?

replies(2): >>23490498 #>>23497596 #
2. iso-8859-1 ◴[] No.23490498[source]
gRPC is awkward on web because it assumes HTTP/2. The web is still half HTTP/1. Also, gRPC does almost everything, but not quite, it doesn't know how to synchronize state in general. It is a heavy weight choice considering that you may only need protobuf. And protobuf is not natively supported in browsers, web devs can't agree on serialization libs, they can only agree on the serialization format. And they didn't choose protobuf ;)
3. zimpenfish ◴[] No.23497596[source]
Currently working on a public-facing gRPC API and it's much more faffy than a REST API. Browsers don't talk gRPC which means you need to support gRPC-web endpoints. You probably need a gRPC aware proxy too and most of those have their own challenges. Some stuff doesn't like protobufs which means you need JSON transport which means protoc plugins. etc.etc. It's all just more work for (IMHO) little gain.