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

99designs / gqlgen / 23537634227
0%

Build:
DEFAULT BRANCH: master
Ran 25 Mar 2026 11:04AM UTC
Jobs 1
Files 0
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

25 Mar 2026 11:00AM UTC coverage: 0.0%. Remained the same
23537634227

push

github

web-flow
fix: add locations to resolver error responses (#4090)

* fix: add locations to resolver error responses

Per the GraphQL spec (section 7.1.2), errors associated with a
particular field should include the locations field indicating the
field's position in the query document.

Previously, when a resolver returned an error, gqlgen wrapped it
with the correct path but did not attach locations. This change
adds location data from the FieldContext's parsed AST field to
errors returned from the field resolver chain.

The fix:
- New AddFieldLocationToError() function extracts the field position
  from FieldContext.Field.Field.Position and attaches it as
  gqlerror.Location{Line, Column}
- Called in resolveField() when the resolver/middleware chain returns
  an error (line 118), so only field-level errors get locations
- ErrorOnPath() is unchanged — input coercion and validation errors
  are not affected
- Preserves existing locations if already set
- Handles nil FieldContext and nil Position gracefully

This makes gqlgen's error responses match the behavior of other
GraphQL implementations (e.g., webonyx/graphql-php, graphql-js).

Test updates:
- Updated error expectations in 8 test files to include locations
  for field-level errors (directive, introspection, null bubbling,
  interface, and compliant-int tests)
- Changed substring Contains check to separate field checks where
  the error JSON structure changed

Fixes #4089

* fix: update test expectations for resolver error locations and fix golines formatting

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23537634227.1 25 Mar 2026 11:04AM UTC 0
0.0
GitHub Action Run
Source Files on build 23537634227
Detailed source file information is not available for this build.
  • Back to Repo
  • 76c50efb on github
  • Prev Build on master (#23502960951)
  • Next Build on master (#23591156921)
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

© 2026 Coveralls, Inc