Skip to content

feat: add experimentalAllowEmptyTypes for empty types - #4934

Open
DaleSeo wants to merge 5 commits into
graphql:17.x.xfrom
DaleSeo:experimental-allow-empty-types
Open

DaleSeo wants to merge 5 commits into
graphql:17.x.xfrom
DaleSeo:experimental-allow-empty-types

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Oct 29, 2026 •

Copy link
Copy Markdown

This brings all the empty-type work together in one PR behind a single experimentalAllowEmptyTypes flag. The flag covers the following spec proposals:

When the flag is enabled, the parser accepts {} in field and input field definitions. Validation also allows object, interface, and input object types with no fields, as well as union types with no members. OneOf input objects still need at least one field, since an empty OneOf input object can never have a valid value.

This supersedes #4862, #4863, and #4923. Those can be closed if this approach is preferred.

@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

@DaleSeo is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@DaleSeo
DaleSeo marked this pull request as ready for review October 29, 2026 19:17
@martinbonnin

Copy link
Copy Markdown
Contributor

Simple 👍 I like it.
It's also the route we took in Apollo Kotlin: apollographql/apollo-kotlin#7043

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants