Skip to content

Conversation

m0rt3nlund
Copy link
Contributor

Based on what I could find this seems to be the valid returns for the supports/1 callback?

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Based on what I could find this seems to be the valid returns for the `supports/1` callback?
@m0rt3nlund
Copy link
Contributor Author

I am not 100% sure about my explanation, but this is how I understood it :)

`c:init/1` is defined automatically by `use Ash.Resource.Preparation`, but can be implemented if you want to validate/transform any
options passed to the module.
`c:supports/1` is also required and returns a list containing any or all of the following: `[Ash.Changeset, Ash.Query, Ash.ActionInput]` based on what your `c:prepare/3` implementation supports
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required is nebulous because its not required to implement yourself. A default is provided by the use macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants