Schema Deprecation

Use the deprecate option when defining any field or enum value.

  • Provide a binary value to give a deprecation reason
  • Provide true to just mark it as deprecated

An example:

query do
  field :old_item, :item, deprecate: true
  field :another_old_item, :item, deprecate: "still too old"

You can also use the deprecate as a macro inside a block, for instance:

field :age, :integer do
  arg :user_id, non_null(:id)

With a reason:

field :ssn, :string do
  deprecate "Privacy concerns"

Warning: Deprecated fields and enum values are not reported by default during introspection.