Skip to content

feat(validation): deprecated iface impl discrepancy#734

Merged
pavelnikolov merged 1 commit intomainfrom
deprecated-dir-discrepancy
Apr 25, 2026
Merged

feat(validation): deprecated iface impl discrepancy#734
pavelnikolov merged 1 commit intomainfrom
deprecated-dir-discrepancy

Conversation

@pavelnikolov
Copy link
Copy Markdown
Member

@pavelnikolov pavelnikolov commented Apr 25, 2026

Implementations may not deprecate a field that the interface hasn't deprecated.
Addresses graphql/graphql-spec#1053

Copilot AI review requested due to automatic review settings April 25, 2026 22:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds schema validation to prevent an implementing object/interface field from being marked @deprecated when the corresponding interface field is not, aligning behavior with graphql-spec PR #1053.

Changes:

  • Enforce @deprecated directive consistency between interface fields and implementing fields (object and interface implementations).
  • Add test cases covering allowed and rejected deprecation combinations for interface implementations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/schema/schema.go Adds validation during interface field implementation checks to reject deprecation on the implementing field when the interface field is not deprecated.
internal/schema/schema_test.go Adds acceptance/rejection test cases to verify the new deprecation consistency rule for objects and interfaces implementing interfaces.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pavelnikolov pavelnikolov force-pushed the deprecated-dir-discrepancy branch from f39fd5a to 1ca7d97 Compare April 25, 2026 22:57
@pavelnikolov pavelnikolov merged commit f8983aa into main Apr 25, 2026
3 checks passed
@pavelnikolov pavelnikolov deleted the deprecated-dir-discrepancy branch April 25, 2026 22:59
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