gRPC over GraphQL

Moved from GitHub dgraph/4939

Posted by l4nn1312:

What you wanted to do

I’d like to be able to query my v2 /graphql database from gRPC and the go client because protobufs are smaller than JSON (if I’m not mistaken) and I can keep a database ope

What you actually did

Right now I’m having my go server make raw graphql queries to access the database which feels clunky.

Any external references to support your case

Other folks suggested it in the discourse.

I had a similar question… but more just curious as not using /graphql currently, just looking into it. Thanks

We don’t have plans to support the GraphQL API over gRPC right now. Even if we do, we would have to mostly send the JSON response back wrapped in a protobuf which won’t save the user much bandwidth.

Curious as to how do you plan to use this? Are you planning to use the gRPC API from the browser or from a backend server? Last I checked, browsers don’t have great support for gRPC.

1 Like

Cheers. No actual plans to use /graphql yet, so just trying to understand its capabilities/uses. As u allude to /graphql is aimed at being a tool for UI apps to call directly, and not for other servers to call, which in itself clarifies it a bit more for me. Thanks