data
data copied to clipboard
feat: `HashField` equivalent for `type`
Hashfield can be used to compute the key of a payload based on some predefined function, but there is currently no equivalent functionality for type.
For example, given some payload like:
{
"type": "create_issue",
"data": "random",
}
It would be useful to have a handler that can provide a computed property for type based on the incoming payload, i.e. set up a handler to compute the JSON API resource type based on some function. This is especially useful when sending payloads between services, and not needing to have handlers setup elsewhere.