2018-07-10 10:19:45 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Graphql
|
|
|
|
module MountMutation
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
2018-08-27 08:35:31 -04:00
|
|
|
class_methods do
|
2018-07-10 10:19:45 -04:00
|
|
|
def mount_mutation(mutation_class)
|
|
|
|
# Using an underscored field name symbol will make `graphql-ruby`
|
|
|
|
# standardize the field name
|
|
|
|
field mutation_class.graphql_name.underscore.to_sym,
|
|
|
|
mutation: mutation_class
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|