module GraphQL::Schema::Member::BaseDSLMethods
def authorized?(object, context)
def authorized?(object, context) true end
def comment(new_comment = NOT_CONFIGURED)
-
(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
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)
-
(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)
-
(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)
-
(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)
-
(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)
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