Skip to main content

Implementations may not deprecate a field that the interface hasn't deprecated

At a glanceā€‹

Timelineā€‹


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 on Node should also be deprecated:

interface Node {
id: ID! @deprecated(reason: "...")
}

Relevant action item: https://github.com/graphql/graphql-wg/issues/1331