improvement: add get? metadata

This commit is contained in:
Zach Daniel 2021-10-21 22:12:28 -04:00
parent 3a56d4cc04
commit 0e66801ebe

View file

@ -7,6 +7,7 @@ defmodule Ash.Resource.Actions.Read do
:primary?,
:filter,
:description,
:get?,
transaction?: false,
arguments: [],
preparations: [],
@ -31,6 +32,13 @@ defmodule Ash.Resource.Actions.Read do
doc:
"A filter template, that may contain actor references. See `Ash.Filter` for more on templates"
],
get?: [
type: :boolean,
doc: """
Expresses that this action innately only returns a single result. Can be used by extensions to validate that you have not hooked something up that expects a list
to an action that can only return one thing. This is not used internally (but may be in the future).
"""
],
transaction?: [
type: :boolean,
default: false,