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

Instance Method Summary collapse

Instance Method Details



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