At a glance
- Identifier: #1211
- Stage: RFC 1 / Proposal
- Champion: @jbellenger
- Latest activity: 2 commits pushed on 2026-05-07
- Spec PR: https://github.com/graphql/graphql-spec/pull/1211
Spec PR description
OneOf types can form graphs for which finite values cannot be created.
The simplest example of this is a self-recursing OneOf type:
input A @oneOf { a:A }
While this is the simplest form, OneOfs can also be combined with non-OneOf input object types to create other uninhabited types:
input A @oneOf { b:B }
input B { a:A! }
These kinds of types are considered valid on two fronts today:
- They are valid as OneOf types because all field types are nullable and there are no default values
- They are valid as a circular input object because there are no unbreakable chains of non-null non-list fields
While this follows the letter of the Circular References part of the spec, it violates the spirit of the spec in that there is no way to create a finite, legal value for these types. I propose that these topologies be declared invalid.
I took a stab at reworking the Circular References section to consider OneOfs and added a more formal specification framed around finite values.
Timeline
May 2026
- 2 commits pushed on 2026-05-07
- @jbellenger committed "Merge remote-tracking branch 'upstream/main' into jbellenger-oneof-in…"
- @jbellenger committed "apply prettier line wrapping"
- Added to WG agenda on 2026-05-07
March 2026
- Advanced to RFC 1 on 2026-03-05 by leebyron
- Added to WG agenda on 2026-03-05
- @jbellenger committed "feedback" on 2026-03-03
February 2026
- @jbellenger committed "feedback" on 2026-02-28
- Top comment edited on 2026-02-27 by jbellenger
- Top comment edited on 2026-02-26 by jbellenger
- @jbellenger committed "rework circular references section" on 2026-02-26
- Top comment edited on 2026-02-17 by jbellenger
- Spec PR created on 2026-02-17 by jbellenger
- Advanced to RFC 0 on 2026-02-17 by benjie
- @jbellenger committed "spec edits for OneOf inhabitability" on 2026-02-16