Class: GraphQL::Schema::Printer::TypeKindPrinters::ObjectPrinter

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



275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/graphql/schema/printer.rb', line 275

def self.print(warden, type)
  interfaces = warden.interfaces(type)
  if interfaces.any?
    implementations = " implements #{interfaces.sort_by(&:name).map(&:to_s).join(", ")}"
  else
    implementations = nil
  end

  "#{print_description(type)}"\
  "type #{type.name}#{implementations} {\n"\
  "#{print_fields(warden, type)}\n"\
  "}"
end