ash_graphql/test/support/resources/comment.ex
Zach Daniel 9151b712f1 improvement: start on error messaging groundwork
fix: properly handle relationship changes on updates
2021-03-15 15:51:17 -04:00

27 lines
429 B
Elixir

defmodule AshGraphql.Test.Comment do
@moduledoc false
use Ash.Resource,
data_layer: Ash.DataLayer.Ets,
extensions: [AshGraphql.Resource]
graphql do
type :comment
queries do
get :get_comment, :read
end
mutations do
create :create_comment, :create
end
end
attributes do
uuid_primary_key(:id)
end
relationships do
belongs_to(:post, AshGraphql.Test.Post)
end
end