summaryrefslogtreecommitdiff
path: root/src/services/api/graphql
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-12-19 15:21:03 -0600
committerJohn Estabrook <jestabro@vyos.io>2022-12-19 15:21:03 -0600
commite1049d5f28d8863d79360380029a561e70467fab (patch)
treec70a402d6f91e950f17406a4ce91f49e44d762f4 /src/services/api/graphql
parent71d2c583e3b8331e877bbb2f364b6da5c0a587a0 (diff)
downloadvyos-1x-e1049d5f28d8863d79360380029a561e70467fab.tar.gz
vyos-1x-e1049d5f28d8863d79360380029a561e70467fab.zip
graphql: T4887: interpret all boolean options as nullable
Diffstat (limited to 'src/services/api/graphql')
-rw-r--r--src/services/api/graphql/libs/op_mode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/api/graphql/libs/op_mode.py b/src/services/api/graphql/libs/op_mode.py
index 6939ed5d6..211f8ce19 100644
--- a/src/services/api/graphql/libs/op_mode.py
+++ b/src/services/api/graphql/libs/op_mode.py
@@ -84,7 +84,7 @@ def map_type_name(type_name: type, optional: bool = False) -> str:
if type_name == int:
return 'Int!' if not optional else 'Int = null'
if type_name == bool:
- return 'Boolean!' if not optional else 'Boolean = false'
+ return 'Boolean = false'
if typing.get_origin(type_name) == list:
if not optional:
return f'[{map_type_name(typing.get_args(type_name)[0])}]!'