Method: GraphQL::Schema::Field#comment

Defined in:
lib/graphql/schema/field.rb

#comment(text = nil) ⇒ String?

Parameters:

  • text (String) (defaults to: nil)

Returns:

  • (String, nil)


385
386
387
388
389
390
391
392
393
394
395
# File 'lib/graphql/schema/field.rb', line 385

def comment(text = nil)
  if text
    @comment = text
  elsif !NOT_CONFIGURED.equal?(@comment)
    @comment
  elsif @resolver_class
    @resolver_class.comment
  else
    nil
  end
end