fix(graphql): handle annotations inside blocks

This commit is contained in:
Paul Chavard 2022-07-21 14:54:14 +02:00
parent e22ba34394
commit 3e40b6d7bc
13 changed files with 303 additions and 39 deletions

View file

@ -6,11 +6,10 @@ module Mutations
def resolve(dossier:, annotation_id:, instructeur:, value:)
resolve_with_type(
:checkbox,
dossier,
annotation_id,
instructeur,
value
dossier: dossier,
annotation_id: annotation_id,
instructeur: instructeur,
value: value
) do |type_champ, value|
if type_champ == TypeDeChamp.type_champs.fetch(:yes_no)
value ? 'true' : 'false'
@ -19,5 +18,11 @@ module Mutations
end
end
end
private
def input_type
:checkbox
end
end
end