Method: GraphQL::Schema::Member::BaseDSLMethods#description

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

#description(new_description = nil) ⇒ 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 description; OR call it without an argument to get the description

Parameters:

  • new_description (String) (defaults to: nil)

Returns:

  • (String)


43
44
45
46
47
48
49
50
51
# File 'lib/graphql/schema/member/base_dsl_methods.rb', line 43

def description(new_description = nil)
  if new_description
    @description = new_description
  elsif defined?(@description)
    @description
  else
    @description = nil
  end
end