Open koblas opened 5 years ago
The graphql.BindField() function only respects the json: tag. It would be useful if you could specify a different tag for graphql serialization.
graphql.BindField()
json:
Something like
type BaseStream struct { OriginalSize int32 `json:"original_size" graphql:"originalSize"` Resolution string `json:"resolution"` SeriesType string `json:"series_type" graphql:"seriesType"` }
Right now after creating an object with BindFields you get:
original_size: Int resolution: String series_type: String
This makes it possible to use a single model object to read a network request then modify it for GraphqQL serialisation.
The
graphql.BindField()
function only respects thejson:
tag. It would be useful if you could specify a different tag for graphql serialization.Something like
Right now after creating an object with BindFields you get:
This makes it possible to use a single model object to read a network request then modify it for GraphqQL serialisation.