Ash.TypedStruct

No description
3 Replies
ZachDaniel
ZachDanielOP3mo ago
Zach Daniel (@zachdaniel.dev)
Introducing `Ash.TypedStruct`, a nice convenient wrapper around creating struct types 🎉. It doesn't do typespecs, as we're waiting for the type system to add generated types in Ash, but you get all the other benefits, including automatically supporting OpenAPI & AshGraphql. #AshFramework #ElixirLang
From Zach Daniel (@zachdaniel.dev)
Bluesky
Terris
Terris3mo ago
I’ve looked around for docs. What I would like to know is does this mean i need to do something like user.profile.username ? Eg if a field can be used in a calculation what does the accessor look like?
ZachDaniel
ZachDanielOP3mo ago
I believe the accessor is brackets i.e field[:subfield]

Did you find this page helpful?