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

99designs / gqlgen / 27276997773
0%

Build:
DEFAULT BRANCH: master
Ran 10 Jun 2026 12:45PM 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

10 Jun 2026 12:42PM UTC coverage: 0.0%. Remained the same
27276997773

push

github

web-flow
graphql: add runtime non-null field support via MarkNonNull (#4138)

* graphql: add runtime non-null field support via MarkNonNull

In GraphQL, null propagation (nulling out a parent object when a child
field resolves to nil) only applies to fields declared as non-null (!)
in the schema. This is a compile-time property baked into the generated
code — there was no way for middleware to trigger it dynamically.

This is needed for use cases like a @priority(value: Required) directive
where the client marks certain fields as semantically required in the
query. These fields are nullable in the schema, but when they fail at
runtime, the response should behave as if they were non-null: the error
propagates up and the nearest nullable ancestor is set to null.

Changes:

- Add FieldContext.NonNull flag and graphql.MarkNonNull(ctx) API.
  A FieldInterceptor calls MarkNonNull during resolution to opt a
  nullable field into non-null semantics for that request.

- Add graphql.RequiredNull sentinel. It marshals to "null" like
  graphql.Null but is a distinct pointer. resolveField returns it
  (instead of Null) when a dynamically-marked field fails, so the
  parent's generated code can distinguish the two cases.

- Update resolveField to check fc.NonNull alongside the static nonNull
  parameter. On nil/error, it emits the standard "must not be null"
  error and returns RequiredNull.

- Update object.gotpl so nullable fields check for RequiredNull and
  increment Invalids, triggering the same null propagation cascade as
  a schema-level non-null violation. Concurrent field closures now
  always receive the FieldSet parameter (previously ignored for
  nullable fields).

Existing behavior is fully preserved: statically non-null fields still
return Null and are caught by the existing res == graphql.Null check.
RequiredNull is never returned unless a FieldInterceptor explicitly
opts in via MarkNonNull.

* docs: document runtime non-null fields and add trade-off warnings... (continued)

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27276997773.1 10 Jun 2026 12:45PM UTC 0
0.0
GitHub Action Run
Source Files on build 27276997773
Detailed source file information is not available for this build.
  • Back to Repo
  • 9f8f94f5 on github
  • Prev Build on master (#26986124239)
  • Next Build on master (#27287532861)
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