demarches-normaliennes/app/graphql/mutations/dossier_modifier_annotation_checkbox.rb

22 lines
505 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2020-07-28 18:16:03 +02:00
module Mutations
class DossierModifierAnnotationCheckbox < Mutations::DossierModifierAnnotation
description "Modifier lannotation au format oui/non."
argument :value, Boolean, required: true
def resolve(dossier:, annotation_id:, instructeur:, value:)
resolve_with_type(dossier:, annotation_id:, instructeur:, value:) do |_, value|
value ? 'true' : 'false'
2020-07-28 18:16:03 +02:00
end
end
private
def input_type
:checkbox
end
2020-07-28 18:16:03 +02:00
end
end