Method: GraphQL::Schema::Member::BaseDSLMethods#mutation

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

#mutation(mutation_class = nil) ⇒ Class

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.

The mutation this type was derived from, if it was derived from a mutation

Returns:

  • (Class)


102
103
104
105
106
107
108
109
110
# File 'lib/graphql/schema/member/base_dsl_methods.rb', line 102

def mutation(mutation_class = nil)
  if mutation_class
    @mutation = mutation_class
  elsif defined?(@mutation)
    @mutation
  else
    nil
  end
end