-
Notifications
You must be signed in to change notification settings - Fork 1.2k
A schema with all deprecated elements removed must itself be valid #1231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,9 @@ All types and directives defined within a schema must not have a name which | |
| begins with {"\_\_"} (two underscores), as this is used exclusively by GraphQL's | ||
| introspection system. | ||
|
|
||
| If a GraphQL schema contains any deprecated _schema element_, a copy of the | ||
| schema that omits all deprecated _schema element_ must itself be valid. | ||
|
|
||
| ### Root Operation Types | ||
|
|
||
| :: A schema defines the initial _root operation type_ for each kind of operation | ||
|
|
@@ -968,7 +971,6 @@ IsValidImplementation(type, implementedType): | |
| 2. Let {implementedFieldType} be the return type of {implementedField}. | ||
| 3. {IsValidImplementationFieldType(fieldType, implementedFieldType)} must | ||
| be {true}. | ||
| 6. If {field} is deprecated then {implementedField} must also be deprecated. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imho we should leave this in place though as an implementation of the new definition you've added above? I don't think the spec should leave various ways in which the subset-is-valid needs to be looked out for separately, I think removing this actually says something else-- that an interface field being deprecated may differ from the deprecation status of an implemented field? -- that could be a separate proposal if that's what we want to explore |
||
|
|
||
| IsValidImplementationFieldType(fieldType, implementedFieldType): | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: "A copy of a GraphQL schema that omits every deprecated schema element must itself be valid."
A schema with no deprecated elements will be trivially valid. Also making sure
_schema element_is pluralized correctly.