gitlab-org--gitlab-foss/lib/gitlab/graphql/mount_mutation.rb
Bob Van Landuyt 3bcb04f100 Add mutation toggling WIP state of merge requests
This is mainly the setup of mutations for GraphQL. Including
authorization and basic return type-structure.
2018-07-25 18:37:12 +02:00

18 lines
452 B
Ruby

# frozen_string_literal: true
module Gitlab
module Graphql
module MountMutation
extend ActiveSupport::Concern
module ClassMethods
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