From b9a6a55622e9f7cf6654aad407852c83130d06ca Mon Sep 17 00:00:00 2001 From: siiky Date: Mon, 28 Nov 2022 18:25:06 +0000 Subject: [PATCH] refactor: use an enum instead of strings --- lib/graphql/types.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/graphql/types.js b/lib/graphql/types.js index 64e79490..ef4ce904 100644 --- a/lib/graphql/types.js +++ b/lib/graphql/types.js @@ -49,19 +49,23 @@ type SpeedtestFile { size: Int! } -# True if automatic, False otherwise -type TriggersAutomation { - sanctions: String! - idCardPhoto: String! - idCardData: String! - facephoto: String! - usSsn: String! - custom: [CustomTriggersAutomation]! +enum TriggerAutomationType { + Automatic + Manual } type CustomTriggersAutomation { id: ID! - type: String! + type: TriggerAutomationType! +} + +type TriggersAutomation { + sanctions: TriggerAutomationType! + idCardPhoto: TriggerAutomationType! + idCardData: TriggerAutomationType! + facephoto: TriggerAutomationType! + usSsn: TriggerAutomationType! + custom: [CustomTriggersAutomation]! } type CustomScreen {