2019-12-26 22:10:19 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class MutationOperationModeEnum < BaseEnum
|
|
|
|
graphql_name 'MutationOperationMode'
|
2020-11-24 15:15:51 +05:30
|
|
|
description 'Different toggles for changing mutator behavior'
|
2019-12-26 22:10:19 +05:30
|
|
|
|
|
|
|
# Suggested param name for the enum: `operation_mode`
|
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
value 'REPLACE', 'Performs a replace operation.'
|
|
|
|
value 'APPEND', 'Performs an append operation.'
|
|
|
|
value 'REMOVE', 'Performs a removal operation.'
|
2021-04-29 21:17:54 +05:30
|
|
|
|
|
|
|
def self.default_mode
|
|
|
|
enum[:replace]
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.transform_modes
|
|
|
|
enum.values_at(:remove, :append)
|
|
|
|
end
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
|
|
|
end
|