Ash FrameworkAF
Ash Framework3y ago
24 replies
gordoneliel

How To: Return a computed relationship in a read.

I have a resource like Posts. Each
Post
has a 'top comment'. So when i'm fetching a Post or list of Posts, I will like it to include the top comment like so: post.top_comment.

I'm currently trying to use a preparation to load this relationship but not sure how to execute it on the Ash.Query side of things. Any ideas here would be appreciated!
Was this page helpful?