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 FieldPrinter

print_fields

Methods included from DescriptionPrinter

print_description

Methods included from ArgsPrinter

#print_args, #print_input_value, #print_value

Methods included from DeprecatedPrinter

#print_deprecated

Class Method Details



248
249
250
251
252
253
254
255
# File 'lib/graphql/schema/printer.rb', line 248

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