Skip to content

Generate class for map inputs that are referenced by manage_relationship #64

@sezaru

Description

@sezaru

Code of Conduct

  • I agree to follow this project's Code of Conduct

AI Policy

  • I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.

Is your feature request related to a problem? Please describe.

Basically, when you have some action with an map argument that is used in manage_relationship, ash typescript will have the input as any instead of a class with the inputs typed.

update :something do
  argument :bla, :map

  change manage_relationship(:bla, type: :create, on_no_match: :create)
end

Describe the solution you'd like

Basically I would like for ash_typescript to check if the argument is being referenced by a manage_relationship call, and if that is the case, it will get the relationship resource and create a proper class input for it instead of using any.

I created a post in Elixir Forum regarding the issue, and Zack said that AshGraphql already does that and has the code needed https://elixirforum.com/t/argument-derived-from-struct-for-manage-relationship-changes/74837/2?u=sezaru

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions