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
If the type is of type Float or Decimal (custom from https://github.com/shopspring/decimal) and the value have trailing zero, it will not show the trailing zero.
Eg 191.80 is showing as 191.8
What did you expect?
191.80 Supposed to show 191.80
Minimal graphql.schema and models to reproduce
even when implementing MarshalGQL (for decimal) doesnt work.
What happened?
If the type is of type
Float
orDecimal
(custom from https://github.com/shopspring/decimal) and the value have trailing zero, it will not show the trailing zero.Eg 191.80 is showing as 191.8
What did you expect?
191.80 Supposed to show 191.80
Minimal graphql.schema and models to reproduce
even when implementing MarshalGQL (for decimal) doesnt work.
func (y Decimal) MarshalGQL(w io.Writer) {
fmt.Fprintf(w, decimal.Decimal(y).StringFixed(2))
}
versions
go run github.com/99designs/gqlgen version
?v0.17.45
go version
?1.21.5
The text was updated successfully, but these errors were encountered: