gqlgen
gqlgen copied to clipboard
goModel/goField/goExtraField/goEnum x protobuf API_OPAQUE
What happened?
The Golang team introduced the Go Protobuf: The new Opaque API
In it we closed public fields of the structure (instead, by making the Get/Set/Has/Clear{StructName} methods) and removed optional (pointer)
Because of this, mapping to Protobuf via these GraphQL directives will not work when using API_OPAQUE.
What did you expect?
It may be worth modifying the directives to support fields as interfaces Get/Set/Has/Clear{StructName} methods
Sure, this would be a good config option to add so people could opt-in. A PR would be welcome!