Deprecation

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

An example:

query do
  field :item, :item do
    arg :id, non_null(:id)
    arg :oldId, non_null(:string), deprecate: "It's old."
    resolve fn %{id: item_id}, _ ->
      {:ok, @items[item_id]}
    end
  end
end

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

field :age, :integer do
  deprecate
  arg :user_id, non_null(:id)
end
Just marking as deprecated.
field :ssn, :string do
  deprecate "Privacy concerns"
end
Giving a reason.

At the current time, Absinthe reports any deprecated argument or deprecated input object field used in the errors entry of the result. Non-null constraints are ignored when validating deprecated arguments and input object fields.