I am looking into using grpc for communication between microservices using the grpc-go library, because of the reasons outlined here:
http://www.grpc.io/docs/guides/concepts.html
However, rather than using protobuf as the codec, I want to use graphql as callers can define the shape of the response and only fetch the things they need.
I have thought of 2 options:
1. Use protobufs to wrap graphql/json. Requests will contain the graphql query, variables and the queryname. Responses will just contain a result field containing serialized JSON. This method allows me to use existing tooling and code generation, but the double encoding bothers me.
What are your thoughts?
Cheers,
Francis