Using Ash Resources as input types
I've occasionally encountered issues using Ash resources as input types to actions of other resources. The most common patterns I've seen to resolve this are to simply turn the inputs into a map and let
The culprit in some cases seems to be AshGraphql, which errors following this pattern:
Internally, there is not a lot of danger to using the
manage_relationship figure it out, or to take as a parameter only the :uuid and similarly construct a map with just %{id: uuid} for manage_relationship.The culprit in some cases seems to be AshGraphql, which errors following this pattern:
Internally, there is not a lot of danger to using the
:map approach, since manage_relationship still knows what kind of resource it's supposed to be creating and will error accordingly, but it would be quite nice to be able to declare the input type as the resource itself and get it reported in the GQL schema, generated docs, etc.