gitlab-org--gitlab-foss/lib/gitlab/graphql/mount_mutation.rb
charlieablett a11fe5de44 Wrap proc properly in gitaly call counts
- Add `calls_gitaly: true` to some fields missing (hey, it works!)
- Clarify proc wrapping
- Add kwargs argument to `mount_mutation`
2019-07-03 22:53:13 +12:00

19 lines
499 B
Ruby

# frozen_string_literal: true
module Gitlab
module Graphql
module MountMutation
extend ActiveSupport::Concern
class_methods do
def mount_mutation(mutation_class, **custom_kwargs)
# 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,
**custom_kwargs
end
end
end
end
end