Class: GraphQL::Schema::Printer::TypeKindPrinters::InputObjectPrinter
- Inherits:
-
Object
- Object
- GraphQL::Schema::Printer::TypeKindPrinters::InputObjectPrinter
- Extended by:
- DescriptionPrinter, FieldPrinter
- Defined in:
- lib/graphql/schema/printer.rb
Class Method Summary collapse
Methods included from FieldPrinter
Methods included from DescriptionPrinter
Methods included from ArgsPrinter
#print_args, #print_input_value, #print_value
Methods included from DeprecatedPrinter
Class Method Details
.print(warden, type) ⇒ Object
327 328 329 330 331 332 333 334 335 |
# File 'lib/graphql/schema/printer.rb', line 327 def self.print(warden, type) arguments = warden.arguments(type) fields = arguments.sort_by(&:name).map.with_index{ |field, i| "#{print_description(field, " ", i == 0)}"\ " #{print_input_value(field)}" }.join("\n") "#{print_description(type)}"\ "input #{type.name} {\n#{fields}\n}" end |