graphql_rails icon indicating copy to clipboard operation
graphql_rails copied to clipboard

`graphql.input.attribute.type` does not allow to define input type with subtype using string sytax

Open povilasjurcys opened this issue 2 years ago • 0 comments

At the moment I am forced to write a lot of ugly when my attribute type is a subtype of another input:

graphql.input do |c|
  c.attribute(:foo)
   .type(Foo.graphql.input(:create_foo_input).graphql_input_type) 
end

It would be nice to be able to write everything like this:

c.attribute(:foo).type('Foo').subtype(:create_foo_input)

or maybe

c.attribute(:foo).type('Foo', subtype: :create_foo_input)

povilasjurcys avatar Apr 25 '22 05:04 povilasjurcys