How can I retrieve attributes from a resource record
Which is the preferred way to extract attributes from an
Ash
Ash
record?
record = App.Model |> Ash.Query.for_read(:last) |> App.read_one!# how to get attributes from it?record.attributes ????
record = App.Model |> Ash.Query.for_read(:last) |> App.read_one!# how to get attributes from it?record.attributes ????
Must it be done through
Ash.Resource.Info
Ash.Resource.Info
or through
Ash.Changeset
Ash.Changeset
or it should not be done alltogether
The use case is that I create a record from an external api call and in the same flow I must send a sync to another external api. I must use the record attributes instead of the received attributes because sometimes attributes coming from the first api are missing. I need something like Ash.Changeset data or attributes but for the record.
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.