Skip to content

A schema with all deprecated elements removed must itself be valid#1231

Open
benjie wants to merge 1 commit into
mainfrom
undeprecated-schema-is-valid
Open

A schema with all deprecated elements removed must itself be valid#1231
benjie wants to merge 1 commit into
mainfrom
undeprecated-schema-is-valid

Conversation

@benjie

@benjie benjie commented Jun 10, 2026

Copy link
Copy Markdown
Member

As a precursor to deprecating other schema elements (object types, etc), I figured it would be best to simplify the rule: the schema with all deprecated elements removed should itself be valid. This is a breaking change for servers currently (could mark a previously valid schema as invalid), but solvable in a non-breaking way by removing @deprecated directives, or (once they are supported) adding @deprecated to object types and other positions. It's non-breaking for clients.

This also aligns with #1230 wherein the schema with all deprecated elements removed is represented via { __schema(includeDeprecated: false) { ... } }.

@benjie benjie added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Jun 10, 2026
@benjie

benjie commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

cc @fotoetienne

@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit ac84f6e
🔍 Latest deploy log https://app.netlify.com/projects/graphql-spec-draft/deploys/6a293fdcee4ac800085e4d30
😎 Deploy Preview https://deploy-preview-1231--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.

@fotoetienne

Copy link
Copy Markdown
Contributor

Should this go along with a change to allow empty objects?

@benjie

benjie commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@fotoetienne

fotoetienne commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Yes! Should #1228 be a prereq for #1231?

@benjie benjie added the 🚀 Next Stage? This RFC believes it is ready for the next stage label Jun 18, 2026
@benjie

benjie commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

I don't think it needs to be, but in an ideal world they'd all be merged together.

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

Labels

🚀 Next Stage? This RFC believes it is ready for the next stage 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants