• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

99designs / gqlgen / 17465290901
73%

Build:
DEFAULT BRANCH: master
Ran 04 Sep 2025 01:23PM UTC
Jobs 1
Files 159
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Sep 2025 01:22PM UTC coverage: 72.621% (-0.1%) from 72.728%
17465290901

push

github

web-flow
Add Support For All SIgned and Unsigned Integers (#3787)

* feat(int): add support for all signed integers

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* feat(uint): add support for all unsigned integer types

uint, uint8, uint16, uint32, uint64

* style: fix unnecessary conversion

* fix(int): Potential overflow when casting uint64 to int64.

If v > math.MaxInt64 the cast silently wraps around, turning a large positive value into a negative one and slipping past the size-checks in safeCastSignedNumber, yielding incorrect results instead of a deterministic overflow error.

* fix(uint): wrong max constants for signed branches.

safeCastUnsignedNumber treats "int8"/"int16"/"int32" the same as their unsigned counterparts and compares against math.MaxUint*.
Casting a value 200 into int8 passes the check (200 ≤ 255) and returns int8(200) which is -56 after wrap-around.

* fix: group cases in switch statement

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* test: remove unnecessary tests cases

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* test: add benchmark tests for UnmarshalUint and UnmarshalInt

These are the results from my local setup:
goos: linux
goarch: amd64
pkg: github.com/99designs/gqlgen/graphql
cpu: AMD Ryzen 7 7735HS with Radeon Graphics
BenchmarkUnmarshalIntInitial-16        62162     19745 ns/op
BenchmarkUnmarshalIntNew-16            53192     22884 ns/op
BenchmarkUnmarshalUintInitial-16       18339     67228 ns/op
BenchmarkUnmarshalUintNew-16           54229     22213 ns/op
PASS
ok  github.com/99designs/gqlgen/graphql6.208s

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

112 of 122 new or added lines in 2 files covered. (91.8%)

32 existing lines in 4 files now uncovered.

8814 of 12137 relevant lines covered (72.62%)

743.48 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
94.0
1.41% graphql/int.go
5
94.34
-1.69% graphql/uint.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
75.16
0.0% codegen/config/binder.go
2
64.81
0.0% codegen/object.go
4
72.94
-0.92% codegen/field.go
24
87.22
-0.51% plugin/modelgen/models.go
Jobs
ID Job ID Ran Files Coverage
1 17465290901.1 04 Sep 2025 01:23PM UTC 159
72.62
GitHub Action Run
Source Files on build 17465290901
  • Tree
  • List 159
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • dfc71a44 on github
  • Prev Build on master (#17384131283)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc