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

99designs / gqlgen / 23410169788
0%
master: 0%

Build:
Build:
LAST BUILD BRANCH: fix/global-batch-resolver-scope
DEFAULT BRANCH: master
Ran 22 Mar 2026 08:52PM 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

22 Mar 2026 06:59PM UTC coverage: 0.0%. Remained the same
23410169788

Pull #4090

github

florinel-chis
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
Pull Request #4090: fix: add locations to resolver error responses

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23410169788.1 22 Mar 2026 08:52PM UTC 0
0.0
GitHub Action Run
Source Files on build 23410169788
Detailed source file information is not available for this build.
  • Back to Repo
  • Pull Request #4090
  • PR Base - master (#23191672097)
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