Class: GraphQL::InputObjectType
- Inherits:
-
ObjectType
- Object
- ObjectType
- GraphQL::InputObjectType
- Defined in:
- lib/graph_ql/types/input_object_type.rb
Instance Method Summary collapse
Methods inherited from ObjectType
#arg, #field, #fields, #fields=, #initialize, #interfaces, #to_s, #type
Methods included from Definable
Methods included from NonNullWithBang
Constructor Details
This class inherits a constructor from GraphQL::ObjectType
Instance Method Details
#input_fields(new_fields = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/graph_ql/types/input_object_type.rb', line 4 def input_fields(new_fields=nil) if new_fields.nil? @new_fields else @new_fields = new_fields .reduce({}) {|memo, (k, v)| memo[k.to_s] = v; memo} .each { |k, v| v.respond_to?("name=") && v.name = k} end end |