Calculate only on a read action
Hello everyone. Just starting out with Ash and so far, so good. I'm starting to figure a few things out. What I'm currently struggling with is having a
I have an embedded resource where I'm using a
That works and I get the calculated
How can I have the calculate run only during the read actions?
I tried using a various
calculate only run on a read action.I have an embedded resource where I'm using a
calculate to generate a URL from another field. Here is a snippet from parent resource where the embedded is loaded:That works and I get the calculated
:url field injected into the embedded resource when reading items. Yay! My issue is that the :url field is also being written to the embedded field on create.How can I have the calculate run only during the read actions?
I tried using a various
Ash.Query functions in aprepare in the read action of the embedded resource as well as in the read action of the parent, but couldn't get it load and/or not generate errors.