require-deprecation-date
đĄ This rule provides suggestions (opens in a new tab)
- 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.
Usage Examples
Incorrect
# eslint @graphql-eslint/require-deprecation-date: 'error'
 
type User {
  firstname: String @deprecated
  firstName: String
}Incorrect
# eslint @graphql-eslint/require-deprecation-date: 'error'
 
type User {
  firstname: String @deprecated(reason: "Use 'firstName' instead")
  firstName: String
}Correct
# eslint @graphql-eslint/require-deprecation-date: 'error'
 
type User {
  firstname: String @deprecated(reason: "Use 'firstName' instead", deletionDate: "25/12/2022")
  firstName: String
}Config Schema
The schema defines the following properties: