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
Gqlgen treats the Int graphql type as a golang 64 bit integer. The graphql spec states that the Int graphql type represents a 32 bit integer. This causes issues with clients that assume the underlying type of an integer is 32 bits either by overflowing them or by making them error out altogether.
What did you expect?
Behavior that matches the graphql spec
Error when specifying an Int input that overflows 32bit integers
Truncate Int results that overflow or even better return an indicative error
Minimal graphql.schema and models to reproduce
Any schema with an Int in an input or a regular type
versions
go run github.com/99designs/gqlgen version? v0.17.49
go version? go version go1.22.4 darwin/arm64
The text was updated successfully, but these errors were encountered:
What happened?
Gqlgen treats the
Int
graphql type as a golang 64 bit integer. The graphql spec states that theInt
graphql type represents a 32 bit integer. This causes issues with clients that assume the underlying type of an integer is 32 bits either by overflowing them or by making them error out altogether.What did you expect?
Behavior that matches the graphql spec
Int
input that overflows 32bit integersInt
results that overflow or even better return an indicative errorMinimal graphql.schema and models to reproduce
Any schema with an
Int
in an input or a regular typeversions
go run github.com/99designs/gqlgen version
? v0.17.49go version
? go version go1.22.4 darwin/arm64The text was updated successfully, but these errors were encountered: