mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-21 05:43:28 +12:00
28 lines
502 B
Elixir
28 lines
502 B
Elixir
|
defmodule AshGraphql.Test.Review do
|
||
|
@moduledoc false
|
||
|
|
||
|
use Ash.Resource,
|
||
|
domain: AshGraphql.Test.Domain,
|
||
|
data_layer: Ash.DataLayer.Ets,
|
||
|
extensions: [AshGraphql.Resource]
|
||
|
|
||
|
graphql do
|
||
|
type(:review)
|
||
|
end
|
||
|
|
||
|
actions do
|
||
|
default_accept(:*)
|
||
|
defaults([:create, :read, :update, :destroy])
|
||
|
end
|
||
|
|
||
|
attributes do
|
||
|
uuid_primary_key(:id)
|
||
|
|
||
|
attribute(:text, :string, public?: true)
|
||
|
end
|
||
|
|
||
|
relationships do
|
||
|
belongs_to(:movie, AshGraphql.Test.Movie, public?: true)
|
||
|
end
|
||
|
end
|