Implementations may not deprecate a field that the interface hasn't deprecated
At a glanceā
- Identifier: #1053
- Stage: RFC1: Proposal
- Champion: @benjie
- PR: Implementations may not deprecate a field that the interface hasn't deprecated
Timelineā
- Added to 2023-12-07 WG agenda
- Mentioned in 2023-12 WG notes
- Spec PR created on 2023-11-09 by benjie
- Commit pushed: Implementations may not deprecate a field that the interface hasn't dā¦ on 2023-11-09 by @benjie
This PR addresses a spec validation omission; if an interface field is not deprecated then any implementation of that interface field should also not be deprecated. I.e. the following schema should be invalid, but before this PR it is valid:
interface Node {
id: ID!
}
type Foo implements Node {
id: ID! @deprecated(reason: "...")
}
type Query {
foo: Foo
}To solve this, either the deprecation should be removed, or the
id
field onNode
should also be deprecated:interface Node {
id: ID! @deprecated(reason: "...")
}Relevant action item: https://github.com/graphql/graphql-wg/issues/1331