Skip to content

Field extensions: spec edits - #1196

Closed
egoodwinx wants to merge 11 commits into
graphql:mainfrom
egoodwinx:field-extension
Closed

Field extensions: spec edits#1196
egoodwinx wants to merge 11 commits into
graphql:mainfrom
egoodwinx:field-extension

Conversation

@egoodwinx

@egoodwinx egoodwinx commented Oct 8, 2025

Copy link
Copy Markdown

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 8, 2025

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@netlify

netlify Bot commented Oct 8, 2025

Copy link
Copy Markdown

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit fe7e020
🔍 Latest deploy log https://app.netlify.com/projects/graphql-spec-draft/deploys/6a6b1fd24b1c1e0008f1e8c8
😎 Deploy Preview https://deploy-preview-1196--graphql-spec-draft.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@martinbonnin martinbonnin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! Few comments below

Comment thread spec/Appendix C -- Grammar Summary.md Outdated
Comment thread spec/Appendix C -- Grammar Summary.md Outdated
Comment thread spec/Appendix C -- Grammar Summary.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Appendix C -- Grammar Summary.md Outdated

@benjie benjie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little editorial

Comment thread spec/Appendix C -- Grammar Summary.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
@martinbonnin martinbonnin changed the title add initial outline for field extensions Add initial outline for field extensions Jan 26, 2026
@martinbonnin martinbonnin added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Jan 26, 2026
@martinbonnin martinbonnin changed the title Add initial outline for field extensions Field extensions: spec edits Jan 26, 2026
@martinbonnin martinbonnin removed the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Jan 26, 2026
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated
Comment thread spec/Section 3 -- Type System.md Outdated

@mjmahone mjmahone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the biggest thing I'd say is that we should be explicit that we're making extend mean merge: at each level it's OK for something to be missing in the extend, in which case that means we use the original value if any, but if it exists on both it must be exactly matching.

```

```graphql example
extend type Query {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this world, extend is a keyword for merge?

two fields may share the same name.
2. If a field with the same name exists on the previous Object type:
1. The field type must match the previous definition exactly.
2. The field description must match the previous definition exactly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or be empty. It would be really annoying to not be able to extend a field because I chose not to add the description.

@egoodwinx egoodwinx Feb 8, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this should be the intended outcome.

Comment thread spec/Section 3 -- Type System.md
Comment thread spec/Section 3 -- Type System.md Outdated
Comment on lines 1413 to 1414
3. Any fields of an Interface type extension must not be already defined on the
previous Interface type.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line now contradicts the block added just above it. Rule 2 ("For each field of an Interface type extension: … 2. If a field with the same name exists on the previous Interface type: …") permits redeclaring an existing field with a matching definition, but this rule still forbids any field "already defined on the previous Interface type."

The Object Extensions section removed its equivalent line as part of this change; the interface section looks like it should too, otherwise field extensions are simultaneously allowed (rule 2) and disallowed (this rule) on interfaces.

Drafted by Claude (Anthropic AI assistant).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also good catch. Fixed in fe7e020

@martinbonnin martinbonnin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all for the thorough review.

As it stands, it looks to me like this proposal needs to be adressed more globally as we refine type extension vs type merging and make consistent and predictable rules.

With @egoodwinx approval, I'll close this one so we can focus on other areas of the spec.
I'll keep GAP-4 around as a reference for what's implemented in Apollo Kotlin in case other implementers want to try it out.

Edit: got confirmation out of the band from @egoodwinx that it's ok to close this one.

Comment thread spec/Section 3 -- Type System.md
Comment thread spec/Section 3 -- Type System.md Outdated
Comment on lines 1413 to 1414
3. Any fields of an Interface type extension must not be already defined on the
previous Interface type.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also good catch. Fixed in fe7e020

@benjie benjie added the 🗑 Rejected (RFC X) RFC Stage X (See CONTRIBUTING.md) label Jul 30, 2026
martinbonnin added a commit to graphql/gaps that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗑 Rejected (RFC X) RFC Stage X (See CONTRIBUTING.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants