Marking fields as deprecated with graphql shorthand
Yup, you can mark fields as deprecated like this:
type Car {
id: ID!
make: String
model: String
description: String @deprecated(reason: "Field is deprecated!")
}
You can deprecate like this
directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ENUM_VALUE
type ExampleType {
newField: String
oldField: String @deprecated(reason: "Use `newField`.")
}
for more info plz refer to apollo server documentation