Module: GraphQL::Schema::Printer::TypeKindPrinters::DescriptionPrinter
- Included in:
- ArgsPrinter, DirectivePrinter, EnumPrinter, FieldPrinter, InputObjectPrinter, InterfacePrinter, ObjectPrinter, ScalarPrinter, UnionPrinter
- Defined in:
- lib/graphql/schema/printer.rb
Instance Method Summary collapse
Instance Method Details
#print_description(definition, indentation = '', first_in_block = true) ⇒ Object
170 171 172 173 174 175 |
# File 'lib/graphql/schema/printer.rb', line 170 def print_description(definition, indentation='', first_in_block=true) return '' unless definition.description description = indentation != '' && !first_in_block ? "\n".dup : "".dup description << GraphQL::Language::Comments.commentize(definition.description, indent: indentation) end |