module GraphQL::Schema::Member::BaseDSLMethods

def authorized?(object, context)

def authorized?(object, context)
  true
end

def comment(new_comment = NOT_CONFIGURED)

Returns:
  • (String, nil) -

Parameters:
  • new_comment (String) --
def comment(new_comment = NOT_CONFIGURED)
  if !NOT_CONFIGURED.equal?(new_comment)
    @comment = new_comment
  elsif defined?(@comment)
    @comment
  else
    nil
  end
end

def default_graphql_name

without any namespaces and with any `-Type` suffix removed
The default name is the Ruby constant name,
Creates the default name for a schema member.
def default_graphql_name
  @default_graphql_name ||= begin
    raise GraphQL::RequiredImplementationMissingError, 'Anonymous class should declare a `graphql_name`' if name.nil?
    g_name = -name.split("::").last
    g_name.end_with?("Type") ? g_name.sub(/Type\Z/, "") : g_name
  end
end

def default_relay

def default_relay
  false
end

def description(new_description = nil)

Returns:
  • (String) -

Parameters:
  • new_description (String) --
def description(new_description = nil)
  if new_description
    @description = new_description
  elsif defined?(@description)
    @description
  else
    @description = nil
  end
end

def graphql_name(new_name = nil)

Returns:
  • (String) -

Parameters:
  • new_name (String) --
def graphql_name(new_name = nil)
  if new_name
    GraphQL::NameValidator.validate!(new_name)
    @graphql_name = new_name
  else
    @graphql_name ||= default_graphql_name
  end
end

def introspection(new_introspection = nil)

Returns:
  • (Boolean) - If true, this object is part of the introspection system
def introspection(new_introspection = nil)
  if !new_introspection.nil?
    @introspection = new_introspection
  elsif defined?(@introspection)
    @introspection
  else
    false
  end
end

def introspection?

def introspection?
  !!@introspection
end

def mutation(mutation_class = nil)

Returns:
  • (Class) -
def mutation(mutation_class = nil)
  if mutation_class
    @mutation = mutation_class
  elsif defined?(@mutation)
    @mutation
  else
    nil
  end
end

def name(new_name = nil)

Just a convenience method to point out that people should use graphql_name instead
def name(new_name = nil)
  return super() if new_name.nil?
  fail(
    "The new name override method is `graphql_name`, not `name`. Usage: "\
    "graphql_name \"#{new_name}\""
  )
end

def visible?(context)

def visible?(context)
  true
end