2019-11-15 00:06:05 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class MutationOperationModeEnum < BaseEnum
|
|
|
|
graphql_name 'MutationOperationMode'
|
2020-09-16 06:09:24 +00:00
|
|
|
description 'Different toggles for changing mutator behavior'
|
2019-11-15 00:06:05 +00:00
|
|
|
|
|
|
|
# Suggested param name for the enum: `operation_mode`
|
|
|
|
|
2021-03-02 18:11:20 +00:00
|
|
|
value 'REPLACE', 'Performs a replace operation.'
|
|
|
|
value 'APPEND', 'Performs an append operation.'
|
|
|
|
value 'REMOVE', 'Performs a removal operation.'
|
2021-04-06 15:09:23 +00:00
|
|
|
|
|
|
|
def self.default_mode
|
|
|
|
enum[:replace]
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.transform_modes
|
|
|
|
enum.values_at(:remove, :append)
|
|
|
|
end
|
2019-11-15 00:06:05 +00:00
|
|
|
end
|
|
|
|
end
|