You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to fully expose graphql server with grpc+protobuf. Currently, I'm running grpc server and executing the queries using executor as follow (code is simplified as an example)
The issue I have is GraphqlResponse contains already marshalled response into json. I would like to avoid using json and use google's google/protobuf/struct.proto (or my own type) to store the data, so neither client nor server need to unmarshal the json produced by gqlgen and can use directly protobuf types.
Ideal would be to have possibility to marshal into intreface{} instead of json.RawMessage. This would allow me to write custom marshalers that produce my own values suitable for protobuf.
This discussion was converted from issue #1754 on January 19, 2022 13:57.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to fully expose graphql server with grpc+protobuf. Currently, I'm running grpc server and executing the queries using executor as follow (code is simplified as an example)
The issue I have is GraphqlResponse contains already marshalled response into json. I would like to avoid using json and use google's
google/protobuf/struct.proto
(or my own type) to store the data, so neither client nor server need to unmarshal the json produced by gqlgen and can use directly protobuf types.Ideal would be to have possibility to marshal into
intreface{}
instead ofjson.RawMessage
. This would allow me to write custom marshalers that produce my own values suitable for protobuf.versions
gqlgen version
v0.13.0go version
go1.17.5Beta Was this translation helpful? Give feedback.
All reactions