ash_graphql/test/support/resources/award.ex

28 lines
500 B
Elixir
Raw Normal View History

2024-05-27 01:50:54 +12:00
defmodule AshGraphql.Test.Award do
@moduledoc false
use Ash.Resource,
domain: AshGraphql.Test.Domain,
data_layer: Ash.DataLayer.Ets,
extensions: [AshGraphql.Resource]
graphql do
type(:award)
end
actions do
default_accept(:*)
defaults([:create, :read, :update, :destroy])
end
attributes do
uuid_primary_key(:id)
attribute(:name, :string, public?: true)
end
relationships do
belongs_to(:movie, AshGraphql.Test.Movie, public?: true)
end
end