mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 13:24:14 +12:00
25 lines
589 B
Elixir
25 lines
589 B
Elixir
defmodule AshGraphql.Resource.Subscription do
|
|
@moduledoc "Represents a configured query on a resource"
|
|
defstruct [
|
|
:name,
|
|
:actions,
|
|
:read_action
|
|
]
|
|
|
|
@subscription_schema [
|
|
name: [
|
|
type: :atom,
|
|
doc: "The name to use for the subscription."
|
|
],
|
|
actions: [
|
|
type: {:or, [{:list, :atom}, :atom]},
|
|
doc: "The create/update/destroy actions the subsciption should listen to. Defaults to all."
|
|
],
|
|
read_action: [
|
|
type: :atom,
|
|
doc: "The read action to use for reading data"
|
|
]
|
|
]
|
|
|
|
def schema, do: @subscription_schema
|
|
end
|