defmodule MyApp.Types.DayOfWeek do
@moduledoc false
use Ash.Type.NewType,
subtype_of: :atom,
constraints: [one_of: [:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday]]
def graphql_input_type(_), do: :day_of_week
def graphql_type, do: :day_of_week
def graphql_type(_), do: :day_of_week
end
defmodule MyApp.Types.DayOfWeek do
@moduledoc false
use Ash.Type.NewType,
subtype_of: :atom,
constraints: [one_of: [:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday]]
def graphql_input_type(_), do: :day_of_week
def graphql_type, do: :day_of_week
def graphql_type(_), do: :day_of_week
end