module GraphQL::Schema::Member::BaseDSLMethods
def accessible?(context)
def accessible?(context) if @mutation @mutation.accessible?(context) else true end end
def authorized?(object, context)
def authorized?(object, context) if @mutation @mutation.authorized?(object, context) else true 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? name.split("::").last.sub(/Type\Z/, "") end 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 nil end end
def graphql_name(new_name = nil)
-
(String)
-
Parameters:
-
new_name
(String
) --
def graphql_name(new_name = nil) if new_name @graphql_name = new_name else overridden_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 overridden_graphql_name
def overridden_graphql_name defined?(@graphql_name) ? @graphql_name : nil end
def to_graphql
-
(GraphQL::BaseType)
- Convert this type to a legacy-style object.
def to_graphql raise GraphQL::RequiredImplementationMissingError end
def visible?(context)
def visible?(context) if @mutation @mutation.visible?(context) else true end end