- Category:
Schema
- Rule name:
@graphql-eslint/require-deprecation-date
- Requires GraphQL Schema:
false
ℹ️ - Requires GraphQL Operations:
false
ℹ️
Require deletion date on @deprecated
directive. Suggest removing deprecated things after deprecated date.
# eslint @graphql-eslint/require-deprecation-date: 'error'
type User {
firstname: String @deprecated
firstName: String
}
# eslint @graphql-eslint/require-deprecation-date: 'error'
type User {
firstname: String @deprecated(reason: "Use 'firstName' instead")
firstName: String
}
# eslint @graphql-eslint/require-deprecation-date: 'error'
type User {
firstname: String @deprecated(reason: "Use 'firstName' instead", deletionDate: "25/12/2022")
firstName: String
}
The schema defines the following properties: