RFC 1 / Proposal

Allow empty object, interface, and union types

Opened on
Updated on

At a glance

Project
GraphQL Spec
Identifier
#1228
Stage
RFC 1 / Proposal
Champion
@benjie
Updated
2026-12-03
Latest activity
Top comment edited on
Source

Pull request description

Related:

  • #1227

Since 2015 we've always required an object type to define at least 1 field. As we continue to explore GraphQL's position in the new AI-world, we realise that we need schema subsets that represents part of a larger interface, in these cases it's sometimes useful to leave in type references without including full definitions of those types:

type Query {
  topAuthors: [Author!]
}
type Author {
  name: String!
  salesVolume: Int
  averageRating: Float
  topBooks: [Book!]
  mediaCoverage: [Article!]
  recentPublishers: [Publisher!]
}
type Book {}
type Article {}
type Publisher {}

Here the AI can see a basic schema it can write queries against, but it can also ask to expand the parts of the schema that are relevant to its interests - e.g. books or articles or publishers - without wasting context on things it doesn't care about.

We can make a schema like this valid by including at least one field on each of these types, but it's hard for a tool to know which field(s) to include, and not including fields makes it much more obvious to the LLM that the schema is partial. Making this partial schema itself valid would be helpful for tooling.

This need can also be expanded to interfaces and unions:

type Query {
  search(text: String!): Searchable
}
interface Searchable {}

type Mutation {
  someMutation: SomeMutationResult
}
union SomeMutationResult = {}

AI aside:

  • This is also very useful for mutation payloads where no obvious value exists to return yet but we may wish to expand in future. Currently type MyMutationPayload { success: Boolean! } is used as a workaround, but it's messy.
  • This is also very useful for schema evolution - it allows you to create a type before you know what it will contain, and allows you to deprecate all fields of a type without the schema being invalid.
  • This also enables mutation-only schemas whilst still supporting introspection #490

Related:

Timeline

November 2026

October 2026

  • Marked as Ready for Next Stage on by benjie
  • Discussed in GraphQL WG

    The meeting of the GraphQL specification working group focused on discussing empty object types, empty interfaces, and the defer and stream specs. Martin presented a proposal to allow empty object types, which was supported by the group, and it was decided to move this to the next stage for consideration in the primary meeting. The group also discussed allowing empty interfaces and unions, with Benjie explaining the motivation behind these changes. Rob raised concerns about the overhead and potential security issues with the defer feature, particularly when used within large lists, and proposed a limit on the number of defers per request as a solution. Benjie expressed reservations about this approach, suggesting that the underlying issue might be with the label system used for defer accounting and that a better solution could be found. The discussion explored various technical challenges and potential compromises, but no final decision was made on how to address the defer issue.

    Zoom summary · GraphQL WG · 2026-10-15

    GraphQL Empty Object Types Proposal

    The working group discussed allowing empty object types in GraphQL schemas. Martin presented a pull request for this feature, explaining that it would simplify schema development and enable incremental implementation. Benjie provided additional context on the motivation, including handling deprecated fields and allowing partial schema representations. The group agreed to move the proposal to RFC2 status, as it now has an implementation available, but decided to wait for the primary meeting to advance it further due to low attendance in the secondary meeting.

    Zoom summary · GraphQL WG · 2026-10-15

September 2026

July 2026

  • Top comment edited on by benjie
  • Advanced to RFC 1 on by leebyron
  • Discussed in GraphQL WG

    The GraphQL Working Group held their July meeting to review multiple specification proposals and updates. The group discussed best practices for writing robust applications, with Martin presenting a new documentation page on handling schema changes that received approval for immediate merging. James updated the team on one-of-inhabitability specifications, which moved to Stage 2 pending final review, while Pascal provided an overview of OTel semantic conventions requiring TSC approval before merging. Benjie presented several proposals including sibling errors, empty selection sets, empty object types, interfaces with no fields, and unions with no members, with the group supporting these changes and moving them to RFC 2 status. The team also reviewed the GraphQL over HTTP specification, which was nearly ready for release with only minor editorial changes remaining. The conversation ended with plans to complete spec freeze preparations for the upcoming August meeting and September/October specification cut.

    Zoom summary · GraphQL WG · 2026-07-02

    Benjie: Update the "empty object types" proposal to require curly braces for empty object type definitions.

    Zoom summary · GraphQL WG · 2026-07-02

    The team discussed allowing empty object types and partial schemas in GraphQL. Leebyron and Benjie proposed adding curly braces to make it clear when defining a type with no fields, while Pascal suggested allowing empty input objects and enums. Matt highlighted the need for clarity in schema evolution and deprecation processes. Benjie emphasized the value of this feature for both LLMs and human users, particularly in mutation payloads and training courses. The group agreed that allowing empty types would improve schema management and validation, with Benjie taking responsibility for updating the GraphQL syntax to support this change.

    Zoom summary · GraphQL WG · 2026-07-02

May 2026