GraphQL schemas can have fields marked as deprecated. Instead of creating a custom annotation,
graphql-kotlin-schema-generator just looks for the
kotlin.Deprecated annotation and will use that annotation message
for the deprecated reason.
The above query would produce the following GraphQL schema:
While you can deprecate any fields/functions/classes in your Kotlin code, GraphQL only supports deprecation directive on the fields (which correspond to Kotlin fields and functions) and enum values.
Deprecation of input types is not yet supported in the GraphQL spec.