Module: GraphQL::Schema::Printer::TypeKindPrinters::DescriptionPrinter

Instance Method Summary collapse

Instance Method Details


95
96
97
98
99
100
# File 'lib/graphql/schema/printer.rb', line 95

def print_description(definition, indentation='', first_in_block=true)
  return '' unless definition.description

  description = indentation != '' && !first_in_block ? "\n" : ""
  description << GraphQL::Language::Comments.commentize(definition.description, indent: indentation)
end