Module: GraphQL::Schema::Printer::TypeKindPrinters::FieldPrinter

Includes:
ArgsPrinter, DeprecatedPrinter, DescriptionPrinter
Included in:
InputObjectPrinter, InterfacePrinter, ObjectPrinter
Defined in:
lib/graphql/schema/printer.rb

Instance Method Summary collapse

Methods included from DescriptionPrinter

#print_description

Methods included from ArgsPrinter

#print_args, #print_input_value, #print_value

Methods included from DeprecatedPrinter

#print_deprecated

Instance Method Details


164
165
166
167
168
169
# File 'lib/graphql/schema/printer.rb', line 164

def print_fields(type)
  type.all_fields.map.with_index{ |field, i|
    "#{print_description(field, '  ', i == 0)}"\
    "  #{field.name}#{print_args(field, '  ')}: #{field.type}#{print_deprecated(field)}"
  }.join("\n")
end