Class: GraphQL::Schema::Printer::TypeKindPrinters::InputObjectPrinter

Inherits:
Object
  • Object
show all
Extended by:
DescriptionPrinter, FieldPrinter
Defined in:
lib/graphql/schema/printer.rb

Class Method Summary collapse

Methods included from DescriptionPrinter

print_description

Methods included from FieldPrinter

print_fields

Methods included from ArgsPrinter

#print_args, #print_input_value, #print_value

Methods included from DeprecatedPrinter

#print_deprecated

Class Method Details


241
242
243
244
245
246
247
248
# File 'lib/graphql/schema/printer.rb', line 241

def self.print(type)
  fields = type.input_fields.values.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