ash v1.24.2 Ash.Resource.Dsl.Read View Source

Link to this section Summary

Functions

Declares a read action. For calling this action, see the Ash.Api documentation.

Link to this section Functions

Link to this macro

read(name, opts \\ [])

View Source (macro)

Declares a read action. For calling this action, see the Ash.Api documentation.

Pagination

  • :keyset? - Whether or not keyset based pagination is supported The default value is false.

  • :offset? - Whether or not offset based pagination is supported The default value is false.

  • :default_limit - The default page size to apply, if one is not supplied

  • :countable - Whether not a returned page will have a full count of all records. Use :by_default to do it automatically. The default value is false.

  • :max_page_size - The maximum amount of records that can be requested in a single page The default value is 250.

  • :required? - Whether or not pagination can be disabled. Only relevant if some pagination configuration is supplied. The default value is true.

Examples

read :read_all, primary?: true

Arguments

  • :name - The name of the action

Options

  • :filter - A filter template, that may contain actor references. See Ash.Filter for more on templates

  • :pagination - Options for how the action should support pagination. See the pagination section for more information. The default value is false.

  • :primary? - Whether or not this action should be used when no action is specified by the caller. The default value is false.

  • :description - An optional description for the action