Input_object destruction

I want to have input_object: user_obj_input args under a key user_obj in the first mutation(as it is) and under root in a second mutation i.e. destructure input_object like in JS

    field :create_obj, type: :obj do
      arg(:name, non_null(:string))
      arg(:description, non_null(:string))
      arg(:user_obj, non_null(:user_obj_input))

      resolve(&UserActsResolver.create_obj/3)
    end

And

    field :create_user_obj, type: :obj do
      destructure(:user_obj_input)

      resolve(&UserActsResolver.create_user_obj/3)
    end

Does it possible?

Does this help?

https://hexdocs.pm/absinthe/Absinthe.Schema.Notation.html#import_fields/2

2 Likes

No, import_fields is for object. And I work with input_object