Is there a way to make an Attribute from a computed source. I see that an attribute can be marked as generated
not sure if that supports my use case or not.
An example would be you have an Order
Resource and an Attribute called status
that may be one of [:started, :paid, :fulfilled]
And the status can be derived from the Attributes and Relationships of the Order
. (I don’t want to track the status independent of the underlying data so that I can eliminate a whole host of state related bugs)
And a step further would be, if not an Attribute, how would you get that computed value into a GraphQL graph so that you can request it in a Query?