go-proto-gql icon indicating copy to clipboard operation
go-proto-gql copied to clipboard

Add sensible scalar types for well-known types (wkts) especially google.protobuf.Struct

Open perrydunn opened this issue 2 years ago • 0 comments

Currently the GraphQL generated for google.protobuf.Struct (which represents JSON in protobuf) is a recursive type which introduces depth and cycle issues.

Proposal: Create a GraphQL scalar type scalar JSON to represent JSON (google.protobuf.Struct) as a leaf value. It would then be a good idea to ship an implementation in gqlgen.

Similarly other wkts could have reconsidered scalar types, such as google.protobuf.Timestamp as scalar Time for which there is already a gqlgen implementation.

perrydunn avatar Jul 25 '22 14:07 perrydunn