Class: GraphQL::Schema::Printer::TypeKindPrinters::UnionPrinter

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

Class Method Summary collapse

Methods included from DescriptionPrinter

print_description

Class Method Details



301
302
303
304
305
# File 'lib/graphql/schema/printer.rb', line 301

def self.print(warden, type)
  possible_types = warden.possible_types(type)
  "#{print_description(type)}"\
  "union #{type.name} = #{possible_types.sort_by(&:name).map(&:to_s).join(" | ")}"
end