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

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

Class Method Summary collapse

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



190
191
192
193
# File 'lib/graphql/schema/printer.rb', line 190

def self.print(type)
  fields = type.input_fields.values.map{ |field| "  #{print_input_value(field)}" }.join("\n")
  "input #{type.name} {\n#{fields}\n}"
end