Method: GraphQL::Schema::Member::BaseDSLMethods#comment

Defined in:
lib/graphql/schema/member/base_dsl_methods.rb

#comment(new_comment = NOT_CONFIGURED) ⇒ String?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Call this method to provide a new comment; OR call it without an argument to get the comment

Parameters:

  • new_comment (String) (defaults to: NOT_CONFIGURED)

Returns:

  • (String, nil)


57
58
59
60
61
62
63
64
65
# File 'lib/graphql/schema/member/base_dsl_methods.rb', line 57

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