Ash.Union support #5
matt-beanland
started this conversation in
Ideas
Replies: 1 comment
-
|
Have done outstanding implementation for Ash.Union :type_and_value |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ash.Union is a wrapper structure with a type and value. ash_outstanding should natively support Ash.Union.
There are lots of permutations possible, and these could involve the DSL, but the simplest behaviour is probably to require actual to be Ash.Union when expected is Ash.Union, not require type to match, and call outstanding on the values, wrapping a non-nil value result back in Ash.Union of the expected type.
Ash.Union https://hexdocs.pm/ash/Ash.Type.Union.html has two forms: the default :type_and_value, and :map_with_tag.
Beta Was this translation helpful? Give feedback.
All reactions